	.file	"extr_usb-acpi.c_usb_acpi_get_companion_for_port.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	usb_acpi_get_companion_for_port, @function
usb_acpi_get_companion_for_port:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 8[rdi]
	mov	edi, DWORD PTR [rax]
	call	to_usb_device@PLT
	mov	edi, DWORD PTR 4[rax]
	mov	rbx, rax
	test	edi, edi
	jne	.L2
	lea	rdi, 12[rax]
	call	ACPI_COMPANION@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	ebp, DWORD PTR 0[rbp]
	mov	QWORD PTR [rsp], rax
	call	bus_to_hcd@PLT
	mov	esi, ebp
	mov	edi, eax
	call	usb_hcd_find_raw_port_number@PLT
	mov	esi, eax
.L3:
	mov	rdi, QWORD PTR [rsp]
	call	usb_acpi_find_port@PLT
.L1:
	mov	rdx, QWORD PTR 8[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L11
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	esi, DWORD PTR [rax]
	call	usb_get_hub_port_acpi_handle@PLT
	test	rax, rax
	je	.L1
	mov	rsi, rsp
	mov	rdi, rax
	call	acpi_bus_get_device@PLT
	mov	esi, DWORD PTR 0[rbp]
	jmp	.L3
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	usb_acpi_get_companion_for_port, .-usb_acpi_get_companion_for_port
	.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_usb-acpi.c_usb_acpi_get_companion_for_port.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usb_acpi_get_companion_for_port, %function
usb_acpi_get_companion_for_port:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r3, [r0, #4]
	ldr	r2, .L12
	sub	sp, sp, #12
	mov	r5, r0
	ldr	r0, [r3]
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	bl	to_usb_device
	mov	r4, r0
	ldr	r0, [r0, #4]
	cmp	r0, #0
	bne	.L2
	add	r0, r4, #12
	bl	ACPI_COMPANION
	mov	r3, r0
	ldr	r0, [r4, #8]
	str	r3, [sp]
	bl	bus_to_hcd
	ldr	r1, [r5]
	bl	usb_hcd_find_raw_port_number
	mov	r1, r0
.L3:
	ldr	r0, [sp]
	bl	usb_acpi_find_port
	mov	r3, r0
.L1:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [sp, #4]
	eors	r1, r2, r1
	mov	r2, #0
	bne	.L11
	mov	r0, r3
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L2:
	ldr	r1, [r4]
	bl	usb_get_hub_port_acpi_handle
	subs	r3, r0, #0
	beq	.L1
	mov	r1, sp
	bl	acpi_bus_get_device
	ldr	r1, [r5]
	b	.L3
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.size	usb_acpi_get_companion_for_port, .-usb_acpi_get_companion_for_port
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
