	.file	"extr_twl4030-usb.c_twl4030_usb_linkstat.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"USB link status err %d\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"HW_CONDITIONS 0x%02x/%d; link %d\n"
	.text
	.p2align 4
	.type	twl4030_usb_linkstat, @function
twl4030_usb_linkstat:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edx, DWORD PTR STS_HW_CONDITIONS[rip]
	mov	esi, DWORD PTR TWL4030_MODULE_PM_MASTER[rip]
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r13d, DWORD PTR USB_LINK_UNKNOWN[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	call	twl4030_readb@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L11
	mov	edi, 7
	call	BIT@PLT
	mov	edi, 2
	mov	r13d, eax
	call	BIT@PLT
	or	eax, r13d
	mov	r13d, DWORD PTR USB_LINK_NONE[rip]
	test	eax, r12d
	jne	.L12
.L3:
	mov	edi, DWORD PTR 16[rbx]
	mov	ecx, r12d
	mov	edx, r12d
	mov	r8d, r13d
	lea	rsi, .LC1[rip]
	lea	r12, 4[rbx]
	call	dev_dbg@PLT
	mov	rdi, r12
	call	spin_lock_irq@PLT
	cmp	DWORD PTR USB_LINK_ID[rip], r13d
	mov	DWORD PTR [rbx], r13d
	je	.L13
	mov	eax, DWORD PTR OTG_STATE_B_IDLE[rip]
	mov	DWORD PTR 8[rbx], 0
	mov	DWORD PTR 12[rbx], eax
.L7:
	mov	rdi, r12
	call	spin_unlock_irq@PLT
	mov	eax, r13d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	edi, DWORD PTR 16[rbx]
	mov	edx, eax
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	mov	eax, DWORD PTR OTG_STATE_A_IDLE[rip]
	mov	DWORD PTR 8[rbx], 1
	mov	DWORD PTR 12[rbx], eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, 2
	call	BIT@PLT
	mov	r13d, DWORD PTR USB_LINK_ID[rip]
	test	eax, r12d
	cmove	r13d, DWORD PTR USB_LINK_VBUS[rip]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	twl4030_usb_linkstat, .-twl4030_usb_linkstat
	.comm	USB_LINK_VBUS,4,4
	.comm	USB_LINK_UNKNOWN,4,4
	.comm	USB_LINK_NONE,4,4
	.comm	USB_LINK_ID,4,4
	.comm	TWL4030_MODULE_PM_MASTER,4,4
	.comm	STS_HW_CONDITIONS,4,4
	.comm	OTG_STATE_B_IDLE,4,4
	.comm	OTG_STATE_A_IDLE,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_twl4030-usb.c_twl4030_usb_linkstat.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"USB link status err %d\012\000"
	.align	2
.LC1:
	.ascii	"HW_CONDITIONS 0x%02x/%d; link %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	twl4030_usb_linkstat, %function
twl4030_usb_linkstat:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r2, .L12
	ldr	r1, .L12+4
	ldr	r3, .L12+8
	ldr	r2, [r2]
	ldr	r1, [r1]
	sub	sp, sp, #12
	mov	r4, r0
	ldr	r6, [r3]
	bl	twl4030_readb
	subs	r5, r0, #0
	blt	.L10
	mov	r0, #7
	bl	BIT
	mov	r6, r0
	mov	r0, #2
	bl	BIT
	orr	r6, r6, r0
	tst	r6, r5
	bne	.L11
	ldr	r3, .L12+12
	ldr	r7, .L12+16
	ldr	r6, [r3]
.L3:
	str	r6, [sp]
	mov	r2, r5
	mov	r3, r5
	ldr	r1, .L12+20
	add	r5, r4, #4
	ldr	r0, [r4, #16]
	bl	dev_dbg
	mov	r0, r5
	bl	spin_lock_irq
	ldr	r3, [r7]
	str	r6, [r4]
	cmp	r3, r6
	moveq	r2, #1
	movne	r2, #0
	ldreq	r3, .L12+24
	ldrne	r3, .L12+28
	str	r2, [r4, #8]
	ldr	r3, [r3]
	mov	r0, r5
	str	r3, [r4, #12]
	bl	spin_unlock_irq
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L10:
	mov	r2, r5
	ldr	r1, .L12+32
	ldr	r0, [r4, #16]
	bl	dev_err
	ldr	r7, .L12+16
	b	.L3
.L11:
	mov	r0, #2
	bl	BIT
	tst	r0, r5
	ldrne	r7, .L12+16
	ldreq	r3, .L12+36
	ldrne	r6, [r7]
	ldreq	r7, .L12+16
	ldreq	r6, [r3]
	b	.L3
.L13:
	.align	2
.L12:
	.word	STS_HW_CONDITIONS
	.word	TWL4030_MODULE_PM_MASTER
	.word	USB_LINK_UNKNOWN
	.word	USB_LINK_NONE
	.word	USB_LINK_ID
	.word	.LC1
	.word	OTG_STATE_A_IDLE
	.word	OTG_STATE_B_IDLE
	.word	.LC0
	.word	USB_LINK_VBUS
	.size	twl4030_usb_linkstat, .-twl4030_usb_linkstat
	.comm	USB_LINK_VBUS,4,4
	.comm	USB_LINK_UNKNOWN,4,4
	.comm	USB_LINK_NONE,4,4
	.comm	USB_LINK_ID,4,4
	.comm	TWL4030_MODULE_PM_MASTER,4,4
	.comm	STS_HW_CONDITIONS,4,4
	.comm	OTG_STATE_B_IDLE,4,4
	.comm	OTG_STATE_A_IDLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
