	.file	"extr_iohidmanager_hid.c_iohidmanager_hid_device_remove.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	iohidmanager_hid_device_remove, @function
iohidmanager_hid_device_remove:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	eax, eax
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	hid_driver_get_data@PLT
	test	rax, rax
	je	.L2
	test	rbp, rbp
	je	.L27
	mov	rdi, QWORD PTR 0[rbp]
	cmp	rdi, QWORD PTR MAX_USERS[rip]
	jnb	.L29
	mov	esi, DWORD PTR 40[rbp]
	mov	rbx, rax
	call	input_autoconfigure_disconnect@PLT
	mov	rdx, QWORD PTR 0[rbp]
	mov	rax, QWORD PTR 16[rbx]
	xor	esi, esi
	mov	QWORD PTR [rax+rdx*8], 0
	mov	rax, QWORD PTR 8[rbx]
	mov	rdx, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR [rax+rdx*4]
	mov	edx, 8
	call	memset@PLT
	mov	rsi, QWORD PTR 0[rbp]
	mov	rax, QWORD PTR [rbx]
	lea	rdi, [rax+rsi*4]
	call	pad_connection_pad_deinit@PLT
	mov	rdi, QWORD PTR 32[rbp]
	test	rdi, rdi
	je	.L30
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 8[rdi]
	mov	QWORD PTR 32[rbp], rax
	call	free@PLT
.L29:
	mov	rdi, QWORD PTR 32[rbp]
	test	rdi, rdi
	jne	.L4
	mov	rdi, QWORD PTR 24[rbp]
	test	rdi, rdi
	je	.L31
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, QWORD PTR 8[rdi]
	mov	QWORD PTR 24[rbp], rax
	call	free@PLT
.L30:
	mov	rdi, QWORD PTR 24[rbp]
	test	rdi, rdi
	jne	.L8
	mov	rdi, QWORD PTR 16[rbp]
	test	rdi, rdi
	je	.L33
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR 8[rdi]
	mov	QWORD PTR 16[rbp], rax
	call	free@PLT
.L31:
	mov	rdi, QWORD PTR 16[rbp]
	test	rdi, rdi
	jne	.L10
.L33:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	test	rbp, rbp
	jne	.L29
.L27:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	iohidmanager_hid_device_remove, .-iohidmanager_hid_device_remove
	.comm	MAX_USERS,8,8
	.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_iohidmanager_hid.c_iohidmanager_hid_device_remove.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	iohidmanager_hid_device_remove, %function
iohidmanager_hid_device_remove:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	hid_driver_get_data
	cmp	r0, #0
	cmpne	r4, #0
	beq	.L2
	ldr	r3, .L28
	mov	r5, r0
	ldr	r3, [r3]
	ldr	r0, [r4]
	cmp	r0, r3
	bcs	.L23
	ldr	r1, [r4, #20]
	bl	input_autoconfigure_disconnect
	mov	r1, #0
	ldr	r0, [r4]
	ldr	r2, [r5, #8]
	ldr	r3, [r5, #4]
	str	r1, [r2, r0, lsl #2]
	ldr	r2, [r4]
	ldr	r0, [r3, r2, lsl #2]
	mov	r2, #4
	bl	memset
	ldr	r0, [r5]
	ldr	r1, [r4]
	add	r0, r0, r1, lsl #2
	bl	pad_connection_pad_deinit
	ldr	r0, [r4, #16]
	cmp	r0, #0
	beq	.L24
.L4:
	ldr	r3, [r0, #4]
	str	r3, [r4, #16]
	bl	free
.L23:
	ldr	r0, [r4, #16]
	cmp	r0, #0
	bne	.L4
	ldr	r0, [r4, #12]
	cmp	r0, #0
	beq	.L25
.L8:
	ldr	r3, [r0, #4]
	str	r3, [r4, #12]
	bl	free
.L24:
	ldr	r0, [r4, #12]
	cmp	r0, #0
	bne	.L8
	ldr	r0, [r4, #8]
	cmp	r0, #0
	beq	.L27
.L10:
	ldr	r3, [r0, #4]
	str	r3, [r4, #8]
	bl	free
.L25:
	ldr	r0, [r4, #8]
	cmp	r0, #0
	bne	.L10
.L27:
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	free
.L2:
	cmp	r4, #0
	popeq	{r4, r5, r6, pc}
	b	.L23
.L29:
	.align	2
.L28:
	.word	MAX_USERS
	.size	iohidmanager_hid_device_remove, .-iohidmanager_hid_device_remove
	.comm	MAX_USERS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
