	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpsw_gmii_sel_am3352
_cpsw_gmii_sel_am3352:                  ## @cpsw_gmii_sel_am3352
	.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
	movl	%edx, %r13d
	movl	%esi, %ebx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %edi
	callq	_readl
	movl	%eax, %r15d
	movb	$1, %r14b
	leal	-128(%rbx), %ecx
	cmpl	$5, %ecx
	ja	LBB0_4
## %bb.1:
	movq	_AM33XX_GMII_SEL_MODE_RMII@GOTPCREL(%rip), %rax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_3:
	movq	_AM33XX_GMII_SEL_MODE_RGMII@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %r12d
	movl	%ebx, %edi
	callq	_phy_modes
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_5:
	movq	_AM33XX_GMII_SEL_MODE_MII@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_2:
	movq	_AM33XX_GMII_SEL_MODE_RGMII@GOTPCREL(%rip), %rax
LBB0_6:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movl	(%rax), %ebx
	movq	_GMII_SEL_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leal	(%r13,%r13), %r12d
	leal	6(%r13), %edi
	callq	_BIT
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leal	4(%r13), %edi
	callq	_BIT
	movl	%r12d, %ecx
	shll	%cl, %ebx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpq	$0, 8(%rdx)
	je	LBB0_9
## %bb.7:
	testl	%r13d, %r13d
	je	LBB0_15
## %bb.8:
	movq	_AM33XX_GMII_SEL_RMII2_IO_CLK_EN@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ebx
LBB0_9:
	cmpb	$0, -48(%rbp)                   ## 1-byte Folded Reload
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jne	LBB0_14
## %bb.10:
	testl	%r13d, %r13d
	je	LBB0_11
## %bb.12:
	movq	_AM33XX_GMII_SEL_RGMII2_IDMODE@GOTPCREL(%rip), %rsi
	jmp	LBB0_13
LBB0_15:
	movq	_AM33XX_GMII_SEL_RMII1_IO_CLK_EN@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ebx
	cmpb	$0, -48(%rbp)                   ## 1-byte Folded Reload
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jne	LBB0_14
LBB0_11:
	movq	_AM33XX_GMII_SEL_RGMII1_IDMODE@GOTPCREL(%rip), %rsi
LBB0_13:
	orl	(%rsi), %ebx
LBB0_14:
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	orl	%r12d, %r14d
	orl	%eax, %r14d
	notl	%r14d
	andl	%r14d, %r15d
	orl	%ebx, %r15d
	movl	(%rdx), %esi
	movl	%r15d, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_AM33XX_GMII_SEL_MODE_RMII,4,2  ## @AM33XX_GMII_SEL_MODE_RMII
	.comm	_AM33XX_GMII_SEL_MODE_RGMII,4,2 ## @AM33XX_GMII_SEL_MODE_RGMII
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported PHY mode: \"%s\". Defaulting to MII.\n"

	.comm	_AM33XX_GMII_SEL_MODE_MII,4,2   ## @AM33XX_GMII_SEL_MODE_MII
	.comm	_GMII_SEL_MODE_MASK,4,2         ## @GMII_SEL_MODE_MASK
	.comm	_AM33XX_GMII_SEL_RMII1_IO_CLK_EN,4,2 ## @AM33XX_GMII_SEL_RMII1_IO_CLK_EN
	.comm	_AM33XX_GMII_SEL_RMII2_IO_CLK_EN,4,2 ## @AM33XX_GMII_SEL_RMII2_IO_CLK_EN
	.comm	_AM33XX_GMII_SEL_RGMII1_IDMODE,4,2 ## @AM33XX_GMII_SEL_RGMII1_IDMODE
	.comm	_AM33XX_GMII_SEL_RGMII2_IDMODE,4,2 ## @AM33XX_GMII_SEL_RGMII2_IDMODE
	.no_dead_strip	_cpsw_gmii_sel_am3352
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpsw_gmii_sel_am3352
_cpsw_gmii_sel_am3352:                  ; @cpsw_gmii_sel_am3352
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_readl
	mov	x20, x0
	sub	w9, w22, #128
	cmp	w9, #5
	b.hi	LBB0_3
; %bb.1:
	mov	w23, #1
Lloh0:
	adrp	x8, _AM33XX_GMII_SEL_MODE_RMII@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AM33XX_GMII_SEL_MODE_RMII@GOTPAGEOFF]
Lloh2:
	adrp	x10, lJTI0_0@PAGE
Lloh3:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
	mov	w23, #0
	b	LBB0_6
LBB0_3:
	ldr	w23, [x19, #16]
	mov	x0, x22
	bl	_phy_modes
	mov	x2, x0
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_dev_warn
LBB0_4:
	mov	w23, #1
Lloh6:
	adrp	x8, _AM33XX_GMII_SEL_MODE_MII@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AM33XX_GMII_SEL_MODE_MII@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	mov	w23, #1
LBB0_6:
Lloh8:
	adrp	x8, _AM33XX_GMII_SEL_MODE_RGMII@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AM33XX_GMII_SEL_MODE_RGMII@GOTPAGEOFF]
LBB0_7:
	ldr	w26, [x8]
Lloh10:
	adrp	x8, _GMII_SEL_MODE_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GMII_SEL_MODE_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w24, [x8]
	lsl	w25, w21, #1
	add	w0, w21, #6
	bl	_BIT
	mov	x22, x0
	add	w0, w21, #4
	bl	_BIT
	lsl	w8, w26, w25
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_10
; %bb.8:
	cbz	w21, LBB0_13
; %bb.9:
Lloh13:
	adrp	x9, _AM33XX_GMII_SEL_RMII2_IO_CLK_EN@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AM33XX_GMII_SEL_RMII2_IO_CLK_EN@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_10:
	tbnz	w23, #0, LBB0_16
; %bb.11:
	cbz	w21, LBB0_14
; %bb.12:
Lloh16:
	adrp	x9, _AM33XX_GMII_SEL_RGMII2_IDMODE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AM33XX_GMII_SEL_RGMII2_IDMODE@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
Lloh18:
	adrp	x9, _AM33XX_GMII_SEL_RMII1_IO_CLK_EN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _AM33XX_GMII_SEL_RMII1_IO_CLK_EN@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tbnz	w23, #0, LBB0_16
LBB0_14:
Lloh21:
	adrp	x9, _AM33XX_GMII_SEL_RGMII1_IDMODE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AM33XX_GMII_SEL_RGMII1_IDMODE@GOTPAGEOFF]
LBB0_15:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_16:
	lsl	w9, w24, w25
	orr	w9, w9, w22
	orr	w9, w9, w0
	bic	w9, w20, w9
	orr	w0, w8, w9
	ldr	w1, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_writel
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
                                        ; -- End function
	.comm	_AM33XX_GMII_SEL_MODE_RMII,4,2  ; @AM33XX_GMII_SEL_MODE_RMII
	.comm	_AM33XX_GMII_SEL_MODE_RGMII,4,2 ; @AM33XX_GMII_SEL_MODE_RGMII
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported PHY mode: \"%s\". Defaulting to MII.\n"

	.comm	_AM33XX_GMII_SEL_MODE_MII,4,2   ; @AM33XX_GMII_SEL_MODE_MII
	.comm	_GMII_SEL_MODE_MASK,4,2         ; @GMII_SEL_MODE_MASK
	.comm	_AM33XX_GMII_SEL_RMII1_IO_CLK_EN,4,2 ; @AM33XX_GMII_SEL_RMII1_IO_CLK_EN
	.comm	_AM33XX_GMII_SEL_RMII2_IO_CLK_EN,4,2 ; @AM33XX_GMII_SEL_RMII2_IO_CLK_EN
	.comm	_AM33XX_GMII_SEL_RGMII1_IDMODE,4,2 ; @AM33XX_GMII_SEL_RGMII1_IDMODE
	.comm	_AM33XX_GMII_SEL_RGMII2_IDMODE,4,2 ; @AM33XX_GMII_SEL_RGMII2_IDMODE
	.no_dead_strip	_cpsw_gmii_sel_am3352
.subsections_via_symbols
