	.file	"extr_mtk_pcie.c_mtk_pcie_phy_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"unsupported device %x\n"
	.text
	.p2align 4
	.type	mtk_pcie_phy_init, @function
mtk_pcie_phy_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	ebp, edi
	call	device_get_softc@PLT
	mov	edx, DWORD PTR [rax]
	mov	QWORD PTR 8[rax], 0
	cmp	edx, 132
	je	.L2
	jg	.L3
	cmp	edx, 129
	jle	.L23
	mov	edi, ebp
	call	mtk_pcie_phy_mt7628_init@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR ENXIO[rip]
	test	r8d, r8d
	jne	.L1
.L8:
	mov	edi, ebp
	call	mtk_pcie_phy_setup_slots@PLT
	xor	eax, eax
.L1:
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	cmp	edx, 127
	jg	.L24
.L6:
	lea	rsi, .LC0[rip]
	mov	edi, ebp
	call	device_printf@PLT
.L21:
	mov	eax, DWORD PTR ENXIO[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	cmp	edx, 133
	jne	.L6
	mov	edi, ebp
	call	mtk_pcie_phy_mt7620_init@PLT
	test	eax, eax
	je	.L8
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, ebp
	call	mtk_pcie_phy_mt7621_init@PLT
	test	eax, eax
	je	.L8
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edi, ebp
	call	mtk_pcie_phy_rt3883_init@PLT
	test	eax, eax
	je	.L8
	jmp	.L21
	.cfi_endproc
.LFE0:
	.size	mtk_pcie_phy_init, .-mtk_pcie_phy_init
	.comm	ENXIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_mtk_pcie.c_mtk_pcie_phy_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unsupported device %x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mtk_pcie_phy_init, %function
mtk_pcie_phy_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	mov	r4, r0
	bl	device_get_softc
	mov	r3, #0
	ldr	r2, [r0]
	str	r3, [r0, #4]
	sub	r3, r2, #128
	mov	r0, r4
	cmp	r3, #5
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L7
	.word	.L7
	.word	.L6
	.word	.L6
	.word	.L5
	.word	.L3
.L6:
	bl	mtk_pcie_phy_mt7628_init
	cmp	r0, #0
	bne	.L24
.L8:
	mov	r0, r4
	bl	mtk_pcie_phy_setup_slots
	mov	r0, #0
	pop	{r4, pc}
.L7:
	bl	mtk_pcie_phy_rt3883_init
	cmp	r0, #0
	beq	.L8
.L24:
	ldr	r3, .L26
	ldr	r0, [r3]
	pop	{r4, pc}
.L5:
	bl	mtk_pcie_phy_mt7621_init
	cmp	r0, #0
	beq	.L8
	b	.L24
.L3:
	bl	mtk_pcie_phy_mt7620_init
	cmp	r0, #0
	beq	.L8
	b	.L24
.L2:
	ldr	r1, .L26+4
	bl	device_printf
	b	.L24
.L27:
	.align	2
.L26:
	.word	ENXIO
	.word	.LC0
	.size	mtk_pcie_phy_init, .-mtk_pcie_phy_init
	.comm	ENXIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
