	.file	"extr_sunxi.c_sunxi_musb_exit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sunxi_musb_exit, @function
sunxi_musb_exit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR [rdi]
	mov	edi, DWORD PTR [rax]
	call	dev_get_drvdata@PLT
	mov	rdi, QWORD PTR 0[rbp]
	mov	rbx, rax
	call	pm_runtime_put@PLT
	lea	rdi, 24[rbx]
	lea	r12, 8[rbx]
	call	cancel_work_sync@PLT
	mov	edi, DWORD PTR SUNXI_MUSB_FL_PHY_ON[rip]
	mov	rsi, r12
	call	test_bit@PLT
	test	rax, rax
	jne	.L16
.L2:
	mov	edi, DWORD PTR 20[rbx]
	call	phy_exit@PLT
	mov	edi, DWORD PTR SUNXI_MUSB_FL_HAS_RESET[rip]
	mov	rsi, r12
	call	test_bit@PLT
	test	rax, rax
	jne	.L17
.L3:
	mov	edi, DWORD PTR 12[rbx]
	call	clk_disable_unprepare@PLT
	mov	edi, DWORD PTR SUNXI_MUSB_FL_HAS_SRAM[rip]
	mov	rsi, r12
	call	test_bit@PLT
	test	rax, rax
	jne	.L18
.L4:
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR [rbx]
	call	devm_usb_put_phy@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	edi, DWORD PTR 20[rbx]
	call	phy_power_off@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR [rax]
	call	sunxi_sram_release@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edi, DWORD PTR 16[rbx]
	call	reset_control_assert@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	sunxi_musb_exit, .-sunxi_musb_exit
	.comm	SUNXI_MUSB_FL_PHY_ON,4,4
	.comm	SUNXI_MUSB_FL_HAS_SRAM,4,4
	.comm	SUNXI_MUSB_FL_HAS_RESET,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_sunxi.c_sunxi_musb_exit.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sunxi_musb_exit, %function
sunxi_musb_exit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, lr}
	mov	r5, r0
	ldr	r0, [r3]
	bl	dev_get_drvdata
	mov	r4, r0
	ldr	r0, [r5]
	bl	pm_runtime_put
	add	r0, r4, #24
	bl	cancel_work_sync
	ldr	r3, .L19
	add	r6, r4, #8
	mov	r1, r6
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	bne	.L16
.L2:
	ldr	r0, [r4, #20]
	bl	phy_exit
	ldr	r3, .L19+4
	mov	r1, r6
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	bne	.L17
.L3:
	ldr	r0, [r4, #12]
	bl	clk_disable_unprepare
	ldr	r3, .L19+8
	mov	r1, r6
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	bne	.L18
.L4:
	ldr	r1, [r4]
	ldr	r0, [r4, #4]
	bl	devm_usb_put_phy
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L16:
	ldr	r0, [r4, #20]
	bl	phy_power_off
	b	.L2
.L18:
	ldr	r3, [r5]
	ldr	r0, [r3]
	bl	sunxi_sram_release
	b	.L4
.L17:
	ldr	r0, [r4, #16]
	bl	reset_control_assert
	b	.L3
.L20:
	.align	2
.L19:
	.word	SUNXI_MUSB_FL_PHY_ON
	.word	SUNXI_MUSB_FL_HAS_RESET
	.word	SUNXI_MUSB_FL_HAS_SRAM
	.size	sunxi_musb_exit, .-sunxi_musb_exit
	.comm	SUNXI_MUSB_FL_PHY_ON,4,4
	.comm	SUNXI_MUSB_FL_HAS_SRAM,4,4
	.comm	SUNXI_MUSB_FL_HAS_RESET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
