	.file	"extr_hid-core.c_usbhid_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	usbhid_open, @function
usbhid_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	r13d, r13d
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	r12, QWORD PTR 8[rdi]
	mov	rbp, rdi
	mov	edi, DWORD PTR HID_OPENED[rip]
	mov	rsi, r12
	call	set_bit@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR HID_QUIRK_ALWAYS_POLL[rip], eax
	je	.L11
	mov	eax, r13d
	pop	rbp
	.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	rdi, QWORD PTR 8[r12]
	call	usb_autopm_get_interface@PLT
	test	eax, eax
	js	.L12
	mov	rax, QWORD PTR 8[r12]
	mov	rsi, r12
	mov	DWORD PTR [rax], 1
	mov	edi, DWORD PTR HID_RESUME_RUNNING[rip]
	call	set_bit@PLT
	mov	edi, DWORD PTR HID_IN_POLLING[rip]
	mov	rsi, r12
	call	set_bit@PLT
	mov	rdi, rbp
	call	hid_start_in@PLT
	test	eax, eax
	je	.L4
	add	eax, DWORD PTR ENOSPC[rip]
	je	.L5
	mov	rdi, rbp
	call	hid_io_error@PLT
	mov	rdi, QWORD PTR 8[r12]
	call	usb_autopm_put_interface@PLT
.L6:
	mov	edi, 50
	xor	r13d, r13d
	call	msleep@PLT
.L7:
	mov	edi, DWORD PTR HID_RESUME_RUNNING[rip]
	mov	rsi, r12
	call	clear_bit@PLT
	mov	eax, r13d
	pop	rbp
	.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
.L5:
	.cfi_restore_state
	mov	edi, DWORD PTR HID_OPENED[rip]
	mov	rsi, r12
	mov	ebp, DWORD PTR EBUSY[rip]
	call	clear_bit@PLT
	mov	edi, DWORD PTR HID_IN_POLLING[rip]
	mov	rsi, r12
	mov	r13d, ebp
	neg	r13d
	call	clear_bit@PLT
	mov	rdi, QWORD PTR 8[r12]
	mov	DWORD PTR [rdi], 0
	call	usb_autopm_put_interface@PLT
	test	ebp, ebp
	jne	.L7
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, DWORD PTR HID_OPENED[rip]
	mov	rsi, r12
	call	clear_bit@PLT
	mov	r13d, DWORD PTR EIO[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	neg	r13d
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[r12]
	call	usb_autopm_put_interface@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	usbhid_open, .-usbhid_open
	.comm	HID_RESUME_RUNNING,4,4
	.comm	HID_QUIRK_ALWAYS_POLL,4,4
	.comm	HID_OPENED,4,4
	.comm	HID_IN_POLLING,4,4
	.comm	ENOSPC,4,4
	.comm	EIO,4,4
	.comm	EBUSY,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_hid-core.c_usbhid_open.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usbhid_open, %function
usbhid_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	ldr	r5, [r0, #4]
	ldr	r7, .L13
	mov	r1, r5
	ldr	r0, [r7]
	bl	set_bit
	ldr	r3, .L13+4
	ldr	r2, [r4]
	ldr	r3, [r3]
	ands	r6, r2, r3
	movne	r4, #0
	beq	.L11
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	ldr	r0, [r5, #4]
	bl	usb_autopm_get_interface
	cmp	r0, #0
	blt	.L12
	mov	r2, #1
	ldr	r3, [r5, #4]
	ldr	r8, .L13+8
	str	r2, [r3]
	ldr	r9, .L13+12
	mov	r1, r5
	ldr	r0, [r8]
	bl	set_bit
	mov	r1, r5
	ldr	r0, [r9]
	bl	set_bit
	mov	r0, r4
	bl	hid_start_in
	cmp	r0, #0
	beq	.L4
	ldr	r3, .L13+16
	ldr	r3, [r3]
	cmn	r0, r3
	beq	.L5
	mov	r0, r4
	bl	hid_io_error
	ldr	r0, [r5, #4]
	bl	usb_autopm_put_interface
.L6:
	mov	r0, #50
	bl	msleep
	mov	r4, #0
.L7:
	mov	r1, r5
	ldr	r0, [r8]
	bl	clear_bit
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	ldr	r3, .L13+20
	mov	r1, r5
	ldr	r0, [r7]
	ldr	r7, [r3]
	bl	clear_bit
	mov	r1, r5
	ldr	r0, [r9]
	bl	clear_bit
	ldr	r0, [r5, #4]
	rsb	r4, r7, #0
	str	r6, [r0]
	bl	usb_autopm_put_interface
	cmp	r7, #0
	bne	.L7
	b	.L6
.L12:
	mov	r1, r5
	ldr	r0, [r7]
	bl	clear_bit
	ldr	r3, .L13+24
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	ldr	r0, [r5, #4]
	bl	usb_autopm_put_interface
	b	.L6
.L14:
	.align	2
.L13:
	.word	HID_OPENED
	.word	HID_QUIRK_ALWAYS_POLL
	.word	HID_RESUME_RUNNING
	.word	HID_IN_POLLING
	.word	ENOSPC
	.word	EBUSY
	.word	EIO
	.size	usbhid_open, .-usbhid_open
	.comm	HID_RESUME_RUNNING,4,4
	.comm	HID_QUIRK_ALWAYS_POLL,4,4
	.comm	HID_OPENED,4,4
	.comm	HID_IN_POLLING,4,4
	.comm	ENOSPC,4,4
	.comm	EIO,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
