	.file	"extr_hisi_sas_v2_hw.c_phy_down_v2_hw.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"phydown: phy%d phy_state=0x%x\n"
	.text
	.p2align 4
	.type	phy_down_v2_hw, @function
phy_down_v2_hw:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movsx	rdi, edi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	sal	rdi, 4
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	add	rdi, QWORD PTR 16[rsi]
	mov	r13, QWORD PTR 8[rdi]
	mov	r14, QWORD PTR 8[rsi]
	call	del_timer@PLT
	mov	ecx, 1
	mov	esi, r12d
	mov	rdi, rbp
	mov	edx, DWORD PTR PHYCTRL_NOT_RDY_MSK[rip]
	call	hisi_sas_phy_write32@PLT
	mov	esi, DWORD PTR PHY_STATE[rip]
	mov	rdi, rbp
	call	hisi_sas_read32@PLT
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	mov	rdi, r14
	mov	ecx, eax
	mov	ebx, eax
	call	dev_info@PLT
	mov	ecx, r12d
	mov	esi, r12d
	mov	rdi, rbp
	sar	ebx, cl
	mov	edx, ebx
	and	edx, 1
	call	hisi_sas_phy_down@PLT
	mov	edx, DWORD PTR SL_CONTROL[rip]
	mov	esi, r12d
	mov	rdi, rbp
	call	hisi_sas_phy_read32@PLT
	mov	ecx, DWORD PTR SL_CONTROL_CTA_MSK[rip]
	mov	esi, r12d
	mov	rdi, rbp
	mov	edx, DWORD PTR SL_CONTROL[rip]
	not	ecx
	and	ecx, eax
	call	hisi_sas_phy_write32@PLT
	test	r13, r13
	je	.L3
	mov	esi, DWORD PTR 0[r13]
	mov	rdi, rbp
	call	get_wideport_bitmap_v2_hw@PLT
	test	eax, eax
	je	.L10
.L3:
	mov	edx, DWORD PTR TXID_AUTO[rip]
	mov	esi, r12d
	mov	rdi, rbp
	call	hisi_sas_phy_read32@PLT
	mov	edx, DWORD PTR TXID_AUTO[rip]
	mov	esi, r12d
	mov	rdi, rbp
	or	eax, DWORD PTR TXID_AUTO_CT3_MSK[rip]
	mov	ecx, eax
	call	hisi_sas_phy_write32@PLT
	mov	ecx, DWORD PTR CHL_INT0_NOT_RDY_MSK[rip]
	mov	esi, r12d
	mov	rdi, rbp
	mov	edx, DWORD PTR CHL_INT0[rip]
	call	hisi_sas_phy_write32@PLT
	mov	edx, DWORD PTR PHYCTRL_NOT_RDY_MSK[rip]
	mov	esi, r12d
	xor	ecx, ecx
	mov	rdi, rbp
	call	hisi_sas_phy_write32@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, DWORD PTR IRQ_HANDLED[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, rbp
	call	check_any_wideports_v2_hw@PLT
	test	eax, eax
	jne	.L3
	mov	rdi, rbp
	call	timer_pending@PLT
	test	rax, rax
	je	.L3
	mov	rdi, rbp
	call	del_timer@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	phy_down_v2_hw, .-phy_down_v2_hw
	.comm	TXID_AUTO_CT3_MSK,4,4
	.comm	TXID_AUTO,4,4
	.comm	SL_CONTROL_CTA_MSK,4,4
	.comm	SL_CONTROL,4,4
	.comm	PHY_STATE,4,4
	.comm	PHYCTRL_NOT_RDY_MSK,4,4
	.comm	IRQ_HANDLED,4,4
	.comm	CHL_INT0_NOT_RDY_MSK,4,4
	.comm	CHL_INT0,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_hisi_sas_v2_hw.c_phy_down_v2_hw.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"phydown: phy%d phy_state=0x%x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	phy_down_v2_hw, %function
phy_down_v2_hw:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	mov	r4, r1
	ldr	r0, [r1, #8]
	ldr	r7, .L11
	add	r0, r0, r5, lsl #3
	ldr	r8, [r1, #4]
	ldr	r9, [r0, #4]
	bl	del_timer
	ldr	r2, [r7]
	mov	r1, r5
	mov	r3, #1
	mov	r0, r4
	bl	hisi_sas_phy_write32
	ldr	r3, .L11+4
	mov	r0, r4
	ldr	r1, [r3]
	bl	hisi_sas_read32
	mov	r6, r0
	mov	r2, r5
	mov	r3, r6
	mov	r0, r8
	ldr	r1, .L11+8
	bl	dev_info
	ldr	r8, .L11+12
	asr	r2, r6, r5
	mov	r1, r5
	and	r2, r2, #1
	mov	r0, r4
	bl	hisi_sas_phy_down
	mov	r1, r5
	ldr	r2, [r8]
	mov	r0, r4
	bl	hisi_sas_phy_read32
	ldr	r3, .L11+16
	mov	r1, r5
	ldr	r3, [r3]
	ldr	r2, [r8]
	bic	r3, r0, r3
	mov	r0, r4
	bl	hisi_sas_phy_write32
	cmp	r9, #0
	beq	.L3
	mov	r0, r4
	ldr	r1, [r9]
	bl	get_wideport_bitmap_v2_hw
	cmp	r0, #0
	beq	.L10
.L3:
	ldr	r6, .L11+20
	mov	r1, r5
	ldr	r2, [r6]
	mov	r0, r4
	bl	hisi_sas_phy_read32
	ldr	r3, .L11+24
	mov	r1, r5
	ldr	r3, [r3]
	ldr	r2, [r6]
	orr	r3, r0, r3
	mov	r0, r4
	bl	hisi_sas_phy_write32
	ldr	r3, .L11+28
	ldr	r2, .L11+32
	mov	r1, r5
	mov	r0, r4
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	hisi_sas_phy_write32
	mov	r1, r5
	mov	r0, r4
	mov	r3, #0
	ldr	r2, [r7]
	bl	hisi_sas_phy_write32
	ldr	r3, .L11+36
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	mov	r0, r4
	bl	check_any_wideports_v2_hw
	cmp	r0, #0
	bne	.L3
	mov	r0, r4
	bl	timer_pending
	cmp	r0, #0
	beq	.L3
	mov	r0, r4
	bl	del_timer
	b	.L3
.L12:
	.align	2
.L11:
	.word	PHYCTRL_NOT_RDY_MSK
	.word	PHY_STATE
	.word	.LC0
	.word	SL_CONTROL
	.word	SL_CONTROL_CTA_MSK
	.word	TXID_AUTO
	.word	TXID_AUTO_CT3_MSK
	.word	CHL_INT0_NOT_RDY_MSK
	.word	CHL_INT0
	.word	IRQ_HANDLED
	.size	phy_down_v2_hw, .-phy_down_v2_hw
	.comm	TXID_AUTO_CT3_MSK,4,4
	.comm	TXID_AUTO,4,4
	.comm	SL_CONTROL_CTA_MSK,4,4
	.comm	SL_CONTROL,4,4
	.comm	PHY_STATE,4,4
	.comm	PHYCTRL_NOT_RDY_MSK,4,4
	.comm	IRQ_HANDLED,4,4
	.comm	CHL_INT0_NOT_RDY_MSK,4,4
	.comm	CHL_INT0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
