	.file	"extr_hid-core.c_hid_connect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	""
.LC1:
	.string	","
.LC2:
	.string	"Device"
.LC3:
	.string	"<UNKNOWN>"
.LC4:
	.string	"USB"
.LC5:
	.string	"BLUETOOTH"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC6:
	.string	"claimed by neither input, hiddev nor hidraw\n"
	.section	.rodata.str1.1
.LC7:
	.string	"input"
.LC8:
	.string	"%shiddev%d"
.LC9:
	.string	"%shidraw%d"
	.section	.rodata.str1.8
	.align 8
.LC10:
	.string	"%s: %s HID v%x.%02x %s [%s] on %s\n"
	.text
	.p2align 4
	.globl	hid_connect
	.type	hid_connect, @function
hid_connect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	cmp	DWORD PTR [rdi], 128
	je	.L2
	mov	eax, DWORD PTR HID_CONNECT_HIDDEV[rip]
	not	eax
	and	ebx, eax
.L2:
	mov	rdi, r14
	call	hid_hiddev@PLT
	test	rax, rax
	je	.L3
	or	ebx, DWORD PTR HID_CONNECT_HIDDEV_FORCE[rip]
.L3:
	test	DWORD PTR HID_CONNECT_HIDINPUT[rip], ebx
	jne	.L59
.L5:
	test	DWORD PTR HID_CONNECT_HIDDEV[rip], ebx
	je	.L8
	mov	rax, QWORD PTR 56[r14]
	test	rax, rax
	je	.L8
	mov	esi, DWORD PTR HID_CONNECT_HIDDEV_FORCE[rip]
	mov	rdi, r14
	and	esi, ebx
	call	rax
	test	eax, eax
	je	.L60
	.p2align 4,,10
	.p2align 3
.L8:
	test	DWORD PTR HID_CONNECT_HIDRAW[rip], ebx
	jne	.L10
	mov	eax, DWORD PTR 4[r14]
.L11:
	lea	r13, 28[r14]
	test	eax, eax
	je	.L61
.L13:
	test	DWORD PTR HID_CLAIMED_INPUT[rip], eax
	je	.L15
	test	DWORD PTR HID_CONNECT_FF[rip], ebx
	je	.L16
	mov	rax, QWORD PTR 48[r14]
	test	rax, rax
	je	.L16
	mov	rdi, r14
	call	rax
	mov	eax, DWORD PTR 4[r14]
	test	DWORD PTR HID_CLAIMED_INPUT[rip], eax
	jne	.L16
.L15:
	test	DWORD PTR HID_CLAIMED_HIDDEV[rip], eax
	je	.L17
	mov	r12, rsp
	mov	ecx, DWORD PTR 8[r14]
	xor	ebx, ebx
	lea	rdx, .LC0[rip]
	mov	rdi, r12
.L18:
	lea	rsi, .LC8[rip]
	xor	eax, eax
	call	sprintf@PLT
	mov	ecx, DWORD PTR 4[r14]
	lea	edx, [rbx+rax]
.L19:
	test	DWORD PTR HID_CLAIMED_HIDRAW[rip], ecx
	je	.L21
	mov	rax, QWORD PTR 40[r14]
	movsx	rdi, edx
	add	rdi, r12
	test	edx, edx
	lea	rdx, .LC1[rip]
	mov	ecx, DWORD PTR [rax]
	lea	rax, .LC0[rip]
	cmove	rdx, rax
.L22:
	lea	rsi, .LC9[rip]
	xor	eax, eax
	call	sprintf@PLT
.L21:
	mov	eax, DWORD PTR 12[r14]
	xor	ebp, ebp
	lea	rdx, types.1983[rip]
	test	eax, eax
	jne	.L23
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L25:
	add	ebp, 1
	cmp	DWORD PTR 12[r14], ebp
	jbe	.L26
.L23:
	mov	ebx, ebp
	mov	rax, QWORD PTR HID_COLLECTION_APPLICATION[rip]
	sal	rbx, 4
	add	rbx, QWORD PTR 32[r14]
	cmp	QWORD PTR [rbx], rax
	jne	.L25
	mov	r15d, DWORD PTR 8[rbx]
	mov	eax, DWORD PTR HID_USAGE_PAGE[rip]
	and	eax, r15d
	cmp	eax, DWORD PTR HID_UP_GENDESK[rip]
	jne	.L25
	mov	rdi, rdx
	movzx	r15d, r15w
	call	ARRAY_SIZE@PLT
	lea	rdx, types.1983[rip]
	cmp	r15d, eax
	jge	.L25
	movzx	edx, WORD PTR 8[rbx]
	lea	rax, types.1983[rip]
	mov	rdx, QWORD PTR [rax+rdx*8]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L17:
	mov	r12, rsp
	test	DWORD PTR HID_CLAIMED_HIDRAW[rip], eax
	je	.L21
	mov	rax, QWORD PTR 40[r14]
	mov	r12, rsp
	lea	rdx, .LC0[rip]
	mov	rdi, r12
	mov	ecx, DWORD PTR [rax]
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L16:
	mov	r12, rsp
	lea	rsi, .LC7[rip]
	xor	eax, eax
	mov	rdi, r12
	call	sprintf@PLT
	mov	ecx, DWORD PTR 4[r14]
	mov	rbx, rax
	mov	edx, eax
	test	DWORD PTR HID_CLAIMED_HIDDEV[rip], ecx
	je	.L19
	movsx	rdi, eax
	lea	rdx, .LC0[rip]
	mov	ecx, DWORD PTR 8[r14]
	add	rdi, r12
	test	eax, eax
	lea	rax, .LC1[rip]
	cmovne	rdx, rax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L26:
	lea	rdx, .LC2[rip]
.L24:
	mov	eax, DWORD PTR [r14]
	lea	rcx, .LC4[rip]
	cmp	eax, 128
	je	.L27
	cmp	eax, 129
	lea	rcx, .LC3[rip]
	lea	rax, .LC5[rip]
	cmove	rcx, rax
.L27:
	mov	eax, DWORD PTR 20[r14]
	sub	rsp, 8
	.cfi_def_cfa_offset 152
	mov	r8d, DWORD PTR 16[r14]
	mov	rdi, r13
	lea	rsi, .LC10[rip]
	push	rax
	.cfi_def_cfa_offset 160
	mov	eax, DWORD PTR 24[r14]
	movzx	r9d, r8b
	sar	r8d, 8
	push	rax
	.cfi_def_cfa_offset 168
	push	rdx
	.cfi_def_cfa_offset 176
	mov	rdx, r12
	call	dev_info@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 144
	xor	eax, eax
.L1:
	mov	rsi, QWORD PTR 72[rsp]
	xor	rsi, QWORD PTR fs:40
	jne	.L62
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L59:
	.cfi_restore_state
	mov	esi, DWORD PTR HID_CONNECT_HIDINPUT_FORCE[rip]
	mov	rdi, r14
	and	esi, ebx
	call	hidinput_connect@PLT
	test	eax, eax
	jne	.L5
	mov	eax, DWORD PTR HID_CLAIMED_INPUT[rip]
	or	DWORD PTR 4[r14], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, r14
	call	hidraw_connect@PLT
	test	eax, eax
	mov	eax, DWORD PTR 4[r14]
	jne	.L11
	or	eax, DWORD PTR HID_CLAIMED_HIDRAW[rip]
	lea	r13, 28[r14]
	mov	DWORD PTR 4[r14], eax
	test	eax, eax
	jne	.L13
	.p2align 4,,10
	.p2align 3
.L61:
	lea	rsi, .LC6[rip]
	mov	rdi, r13
	call	dev_err@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L60:
	mov	eax, DWORD PTR HID_CLAIMED_HIDDEV[rip]
	or	DWORD PTR 4[r14], eax
	jmp	.L8
.L62:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	hid_connect, .-hid_connect
	.section	.rodata.str1.1
.LC11:
	.string	"Pointer"
.LC12:
	.string	"Mouse"
.LC13:
	.string	"Joystick"
.LC14:
	.string	"Gamepad"
.LC15:
	.string	"Keyboard"
.LC16:
	.string	"Keypad"
.LC17:
	.string	"Multi-Axis Controller"
	.section	.data.rel.local,"aw"
	.align 32
	.type	types.1983, @object
	.size	types.1983, 72
types.1983:
	.quad	.LC2
	.quad	.LC11
	.quad	.LC12
	.quad	.LC2
	.quad	.LC13
	.quad	.LC14
	.quad	.LC15
	.quad	.LC16
	.quad	.LC17
	.comm	HID_USAGE_PAGE,4,4
	.comm	HID_UP_GENDESK,4,4
	.comm	HID_CONNECT_HIDRAW,4,4
	.comm	HID_CONNECT_HIDINPUT_FORCE,4,4
	.comm	HID_CONNECT_HIDINPUT,4,4
	.comm	HID_CONNECT_HIDDEV_FORCE,4,4
	.comm	HID_CONNECT_HIDDEV,4,4
	.comm	HID_CONNECT_FF,4,4
	.comm	HID_COLLECTION_APPLICATION,8,8
	.comm	HID_CLAIMED_INPUT,4,4
	.comm	HID_CLAIMED_HIDRAW,4,4
	.comm	HID_CLAIMED_HIDDEV,4,4
	.comm	ENODEV,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_hid_connect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	",\000"
	.align	2
.LC2:
	.ascii	"Device\000"
	.align	2
.LC3:
	.ascii	"<UNKNOWN>\000"
	.align	2
.LC4:
	.ascii	"USB\000"
	.align	2
.LC5:
	.ascii	"BLUETOOTH\000"
	.align	2
.LC6:
	.ascii	"claimed by neither input, hiddev nor hidraw\012\000"
	.align	2
.LC7:
	.ascii	"input\000"
	.align	2
.LC8:
	.ascii	"%shiddev%d\000"
	.align	2
.LC9:
	.ascii	"%shidraw%d\000"
	.align	2
.LC10:
	.ascii	"%s: %s HID v%x.%02x %s [%s] on %s\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	hid_connect
	.syntax unified
	.arm
	.fpu softvfp
	.type	hid_connect, %function
hid_connect:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0]
	sub	sp, sp, #108
	cmp	r3, #128
	ldr	r3, .L67
	ldr	r5, .L67+4
	ldr	r3, [r3]
	str	r3, [sp, #100]
	mov	r3,#0
	ldrne	r3, [r5]
	mov	r4, r1
	mov	r6, r0
	bicne	r4, r1, r3
	bl	hid_hiddev
	cmp	r0, #0
	ldrne	r3, .L67+8
	ldrne	r3, [r3]
	orrne	r4, r4, r3
	ldr	r3, .L67+12
	ldr	r3, [r3]
	tst	r4, r3
	bne	.L63
.L5:
	ldr	r3, [r5]
	tst	r4, r3
	beq	.L8
	ldr	r3, [r6, #44]
	cmp	r3, #0
	beq	.L8
	ldr	r2, .L67+8
	mov	r0, r6
	ldr	r1, [r2]
	and	r1, r1, r4
	blx	r3
	cmp	r0, #0
	ldreq	r2, .L67+16
	ldreq	r3, [r6, #4]
	ldreq	r2, [r2]
	orreq	r3, r3, r2
	streq	r3, [r6, #4]
.L8:
	ldr	r3, .L67+20
	ldr	r3, [r3]
	tst	r4, r3
	bne	.L10
.L60:
	ldr	r2, [r6, #4]
	add	r8, r6, #28
	mov	r3, r2
	cmp	r3, #0
	beq	.L64
.L13:
	ldr	r5, .L67+24
	ldr	r1, [r5]
	tst	r3, r1
	beq	.L15
	ldr	r3, .L67+28
	ldr	r3, [r3]
	tst	r4, r3
	beq	.L16
	ldr	r3, [r6, #40]
	cmp	r3, #0
	beq	.L16
	mov	r0, r6
	blx	r3
	ldr	r3, [r5]
	ldr	r2, [r6, #4]
	tst	r2, r3
	mov	r3, r2
	bne	.L16
.L15:
	ldr	r2, .L67+16
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L65
	add	r7, sp, #36
	mov	r0, r7
	mov	r4, #0
	ldr	r2, .L67+32
.L17:
	ldr	r3, [r6, #8]
	ldr	r1, .L67+36
	bl	sprintf
	ldr	r2, .L67+40
	ldr	r3, [r6, #4]
	ldr	r2, [r2]
	add	r0, r0, r4
	tst	r2, r3
	addne	r0, r7, r0
	bne	.L19
.L22:
	ldr	ip, [r6, #12]
	cmp	ip, #0
	beq	.L26
	mov	r4, #0
	ldr	r10, .L67+44
	ldr	r9, .L67+48
	ldr	fp, .L67+52
	b	.L23
.L25:
	add	r4, r4, #1
	cmp	ip, r4
	bls	.L26
.L23:
	ldr	r3, [r6, #32]
	ldr	r2, [r10]
	ldr	r0, [r3, r4, lsl #3]
	add	r5, r3, r4, lsl #3
	cmp	r0, r2
	bne	.L25
	ldr	r3, [r5, #4]
	ldr	r2, [r9]
	ldr	r0, [fp]
	and	r2, r2, r3
	cmp	r2, r0
	bne	.L25
	ldr	r0, .L67+56
	str	r3, [sp, #28]
	bl	ARRAY_SIZE
	ldr	r2, .L67+60
	ldr	r3, [sp, #28]
	and	r3, r3, r2
	cmp	r3, r0
	blt	.L58
	ldr	ip, [r6, #12]
	add	r4, r4, #1
	cmp	ip, r4
	bhi	.L23
.L26:
	ldr	r1, .L67+64
.L24:
	ldr	r2, [r6]
	cmp	r2, #128
	beq	.L34
	ldr	r0, .L67+68
	cmp	r2, #129
	ldr	r3, .L67+72
	moveq	r3, r0
.L27:
	ldr	r2, [r6, #16]
	ldr	lr, [r6, #20]
	ldr	ip, [r6, #24]
	and	r4, r2, #255
	str	r1, [sp, #8]
	asr	r1, r2, #8
	stm	sp, {r1, r4}
	mov	r2, r7
	mov	r0, r8
	ldr	r1, .L67+76
	str	lr, [sp, #16]
	str	ip, [sp, #12]
	bl	dev_info
	mov	r0, #0
.L1:
	ldr	r3, .L67
	ldr	r2, [r3]
	ldr	r3, [sp, #100]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L66
	add	sp, sp, #108
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L65:
	ldr	r2, .L67+40
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L61
	add	r7, sp, #36
	mov	r0, r7
	ldr	r2, .L67+32
	b	.L28
.L16:
	ldr	r1, .L67+16
	ldr	r3, .L67+80
	ldr	ip, [r1]
	ldm	r3, {r0, r1}
	tst	r2, ip
	str	r0, [sp, #36]
	strh	r1, [sp, #40]	@ movhi
	bne	.L31
	ldr	r3, .L67+40
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L61
	add	r0, sp, #41
	add	r7, sp, #36
.L19:
	ldr	r2, .L67+84
.L28:
	ldr	r3, [r6, #36]
	ldr	r1, .L67+88
	ldr	r3, [r3]
	bl	sprintf
	b	.L22
.L63:
	ldr	r3, .L67+92
	mov	r0, r6
	ldr	r1, [r3]
	and	r1, r1, r4
	bl	hidinput_connect
	cmp	r0, #0
	ldreq	r2, .L67+24
	ldreq	r3, [r6, #4]
	ldreq	r2, [r2]
	orreq	r3, r3, r2
	streq	r3, [r6, #4]
	b	.L5
.L10:
	mov	r0, r6
	bl	hidraw_connect
	cmp	r0, #0
	bne	.L60
	ldr	r3, .L67+40
	ldr	r2, [r6, #4]
	ldr	r3, [r3]
	add	r8, r6, #28
	orr	r3, r2, r3
	cmp	r3, #0
	mov	r2, r3
	str	r3, [r6, #4]
	bne	.L13
.L64:
	mov	r0, r8
	ldr	r1, .L67+96
	bl	dev_err
	ldr	r3, .L67+100
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L34:
	ldr	r3, .L67+104
	b	.L27
.L61:
	add	r7, sp, #36
	b	.L22
.L31:
	mov	r4, #5
	ldr	r2, .L67+84
	add	r0, sp, #41
	add	r7, sp, #36
	b	.L17
.L58:
	ldr	r3, [r5, #4]
	and	r2, r2, r3
	ldr	r3, .L67+56
	ldr	r1, [r3, r2, lsl #2]
	b	.L24
.L66:
	bl	__stack_chk_fail
.L68:
	.align	2
.L67:
	.word	.LC11
	.word	HID_CONNECT_HIDDEV
	.word	HID_CONNECT_HIDDEV_FORCE
	.word	HID_CONNECT_HIDINPUT
	.word	HID_CLAIMED_HIDDEV
	.word	HID_CONNECT_HIDRAW
	.word	HID_CLAIMED_INPUT
	.word	HID_CONNECT_FF
	.word	.LC0
	.word	.LC8
	.word	HID_CLAIMED_HIDRAW
	.word	HID_COLLECTION_APPLICATION
	.word	HID_USAGE_PAGE
	.word	HID_UP_GENDESK
	.word	.LANCHOR0
	.word	65535
	.word	.LC2
	.word	.LC5
	.word	.LC3
	.word	.LC10
	.word	.LC7
	.word	.LC1
	.word	.LC9
	.word	HID_CONNECT_HIDINPUT_FORCE
	.word	.LC6
	.word	ENODEV
	.word	.LC4
	.size	hid_connect, .-hid_connect
	.section	.rodata.str1.4
	.align	2
.LC12:
	.ascii	"Pointer\000"
	.align	2
.LC13:
	.ascii	"Mouse\000"
	.align	2
.LC14:
	.ascii	"Joystick\000"
	.align	2
.LC15:
	.ascii	"Gamepad\000"
	.align	2
.LC16:
	.ascii	"Keyboard\000"
	.align	2
.LC17:
	.ascii	"Keypad\000"
	.align	2
.LC18:
	.ascii	"Multi-Axis Controller\000"
	.comm	HID_USAGE_PAGE,4,4
	.comm	HID_UP_GENDESK,4,4
	.comm	HID_CONNECT_HIDRAW,4,4
	.comm	HID_CONNECT_HIDINPUT_FORCE,4,4
	.comm	HID_CONNECT_HIDINPUT,4,4
	.comm	HID_CONNECT_HIDDEV_FORCE,4,4
	.comm	HID_CONNECT_HIDDEV,4,4
	.comm	HID_CONNECT_FF,4,4
	.comm	HID_COLLECTION_APPLICATION,4,4
	.comm	HID_CLAIMED_INPUT,4,4
	.comm	HID_CLAIMED_HIDRAW,4,4
	.comm	HID_CLAIMED_HIDDEV,4,4
	.comm	ENODEV,4,4
	.data
	.align	2
	.set	.LANCHOR0,. + 0
	.type	types.4267, %object
	.size	types.4267, 36
types.4267:
	.word	.LC2
	.word	.LC12
	.word	.LC13
	.word	.LC2
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
