	.file	"extr_hid-core.c_hid_allocate_device.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	hid_allocate_device
	.type	hid_allocate_device, @function
hid_allocate_device:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 48
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, DWORD PTR ENOMEM[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	neg	ebp
	call	kzalloc@PLT
	test	rax, rax
	je	.L8
	mov	rdi, rax
	mov	r12, rax
	call	device_initialize@PLT
	mov	eax, DWORD PTR hid_device_release[rip]
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, 4
	mov	edi, DWORD PTR HID_DEFAULT_NUM_COLLECTIONS[rip]
	mov	DWORD PTR 8[r12], eax
	lea	rax, hid_bus_type[rip]
	mov	QWORD PTR [r12], rax
	call	kcalloc@PLT
	mov	QWORD PTR 40[r12], rax
	test	rax, rax
	je	.L10
	mov	eax, DWORD PTR HID_DEFAULT_NUM_COLLECTIONS[rip]
	mov	DWORD PTR 32[r12], eax
	mov	eax, DWORD PTR HID_REPORT_TYPES[rip]
	test	eax, eax
	je	.L4
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR 24[r12]
	mov	edx, ebx
	add	ebx, 1
	lea	rdi, [rax+rdx*4]
	call	INIT_LIST_HEAD@PLT
	cmp	DWORD PTR HID_REPORT_TYPES[rip], ebx
	ja	.L5
.L4:
	lea	rdi, 20[r12]
	call	init_waitqueue_head@PLT
	lea	rdi, 16[r12]
	call	INIT_LIST_HEAD@PLT
	mov	rax, r12
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, r12
	call	put_device@PLT
.L8:
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	edi, ebp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ERR_PTR@PLT
	.cfi_endproc
.LFE0:
	.size	hid_allocate_device, .-hid_allocate_device
	.comm	hid_device_release,4,4
	.comm	hid_bus_type,4,4
	.comm	HID_REPORT_TYPES,4,4
	.comm	HID_DEFAULT_NUM_COLLECTIONS,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_allocate_device.c"
	.text
	.align	2
	.global	hid_allocate_device
	.syntax unified
	.arm
	.fpu softvfp
	.type	hid_allocate_device, %function
hid_allocate_device:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L14
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, .L14+4
	ldr	r3, [r3]
	mov	r0, #28
	ldr	r1, [r7]
	rsb	r6, r3, #0
	bl	kzalloc
	subs	r5, r0, #0
	beq	.L11
	bl	device_initialize
	ldr	r2, .L14+8
	ldr	r3, .L14+12
	ldr	r1, [r2]
	ldr	r4, .L14+16
	ldr	r2, [r7]
	str	r1, [r5, #4]
	ldr	r0, [r4]
	mov	r1, #4
	str	r3, [r5]
	bl	kcalloc
	cmp	r0, #0
	str	r0, [r5, #24]
	beq	.L13
	ldr	r6, .L14+20
	ldr	r2, [r4]
	ldr	r3, [r6]
	str	r2, [r5, #20]
	cmp	r3, #0
	beq	.L4
	mov	r4, #0
.L5:
	ldr	r0, [r5, #16]
	add	r0, r0, r4, lsl #2
	bl	INIT_LIST_HEAD
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bhi	.L5
.L4:
	add	r0, r5, #12
	bl	init_waitqueue_head
	add	r0, r5, #8
	bl	INIT_LIST_HEAD
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	r0, r5
	bl	put_device
.L11:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	ERR_PTR
.L15:
	.align	2
.L14:
	.word	ENOMEM
	.word	GFP_KERNEL
	.word	hid_device_release
	.word	hid_bus_type
	.word	HID_DEFAULT_NUM_COLLECTIONS
	.word	HID_REPORT_TYPES
	.size	hid_allocate_device, .-hid_allocate_device
	.comm	hid_device_release,4,4
	.comm	hid_bus_type,4,4
	.comm	HID_REPORT_TYPES,4,4
	.comm	HID_DEFAULT_NUM_COLLECTIONS,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
