	.file	"extr_phy-sun4i-usb.c_sun4i_usb_phy0_get_vbus_det.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sun4i_usb_phy0_get_vbus_det, @function
sun4i_usb_phy0_get_vbus_det:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	sub	rsp, 16
	.cfi_def_cfa_offset 32
	mov	r8, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	r8, r8
	jne	.L10
	mov	rdi, QWORD PTR [rdi]
	mov	r12d, 1
	test	rdi, rdi
	jne	.L11
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	esi, DWORD PTR POWER_SUPPLY_PROP_PRESENT[rip]
	lea	rdx, 4[rsp]
	call	power_supply_get_property@PLT
	test	eax, eax
	cmove	r12d, DWORD PTR 4[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, r8
	call	gpiod_get_value_cansleep@PLT
	mov	r12d, eax
	jmp	.L1
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sun4i_usb_phy0_get_vbus_det, .-sun4i_usb_phy0_get_vbus_det
	.comm	POWER_SUPPLY_PROP_PRESENT,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_phy-sun4i-usb.c_sun4i_usb_phy0_get_vbus_det.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sun4i_usb_phy0_get_vbus_det, %function
sun4i_usb_phy0_get_vbus_det:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	str	lr, [sp, #-4]!
	ldr	r3, [r0, #4]
	ldr	r2, .L12
	sub	sp, sp, #12
	cmp	r3, #0
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	bne	.L9
	ldr	r0, [r0]
	cmp	r0, #0
	bne	.L10
.L6:
	mov	r0, #1
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #12
	@ sp needed
	ldr	pc, [sp], #4
.L10:
	ldr	r3, .L12+4
	mov	r2, sp
	ldr	r1, [r3]
	bl	power_supply_get_property
	cmp	r0, #0
	ldreq	r0, [sp]
	bne	.L6
	b	.L1
.L9:
	mov	r0, r3
	bl	gpiod_get_value_cansleep
	b	.L1
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	POWER_SUPPLY_PROP_PRESENT
	.size	sun4i_usb_phy0_get_vbus_det, .-sun4i_usb_phy0_get_vbus_det
	.comm	POWER_SUPPLY_PROP_PRESENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
