	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hid_allocate_device            ## -- Begin function hid_allocate_device
	.p2align	4, 0x90
_hid_allocate_device:                   ## @hid_allocate_device
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_device_initialize
	movq	_hid_device_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movq	_hid_bus_type@GOTPCREL(%rip), %rax
	movq	%rax, (%r12)
	movq	_HID_DEFAULT_NUM_COLLECTIONS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	(%r15), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 40(%r12)
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movl	(%rbx), %eax
	movl	%eax, 32(%r12)
	movq	_HID_REPORT_TYPES@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	je	LBB0_5
## %bb.3:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rdi
	addq	%r15, %rdi
	callq	_INIT_LIST_HEAD
	incq	%rbx
	movl	(%r14), %eax
	addq	$4, %r15
	cmpq	%rax, %rbx
	jb	LBB0_4
LBB0_5:
	leaq	20(%r12), %rdi
	callq	_init_waitqueue_head
	movq	%r12, %rdi
	addq	$16, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r12, %rdi
	callq	_put_device
LBB0_7:
	movl	%r14d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_hid_device_release,4,2         ## @hid_device_release
	.comm	_hid_bus_type,4,2               ## @hid_bus_type
	.comm	_HID_DEFAULT_NUM_COLLECTIONS,4,2 ## @HID_DEFAULT_NUM_COLLECTIONS
	.comm	_HID_REPORT_TYPES,4,2           ## @HID_REPORT_TYPES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hid_allocate_device            ; -- Begin function hid_allocate_device
	.p2align	2
_hid_allocate_device:                   ; @hid_allocate_device
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
Lloh3:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	bl	_device_initialize
Lloh5:
	adrp	x8, _hid_device_release@GOTPAGE
Lloh6:
	ldr	x8, [x8, _hid_device_release@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _hid_bus_type@GOTPAGE
Lloh9:
	ldr	x9, [x9, _hid_bus_type@GOTPAGEOFF]
	str	w8, [x19, #8]
	str	x9, [x19]
Lloh10:
	adrp	x22, _HID_DEFAULT_NUM_COLLECTIONS@GOTPAGE
Lloh11:
	ldr	x22, [x22, _HID_DEFAULT_NUM_COLLECTIONS@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w2, [x21]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w8, [x22]
	str	w8, [x19, #32]
Lloh12:
	adrp	x20, _HID_REPORT_TYPES@GOTPAGE
Lloh13:
	ldr	x20, [x20, _HID_REPORT_TYPES@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_5
; %bb.3:
	mov	x21, #0
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	add	x0, x8, x21
	bl	_INIT_LIST_HEAD
	add	x22, x22, #1
	ldr	w8, [x20]
	add	x21, x21, #4
	cmp	x22, x8
	b.lo	LBB0_4
LBB0_5:
	add	x0, x19, #20
	bl	_init_waitqueue_head
	add	x0, x19, #16
	bl	_INIT_LIST_HEAD
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	bl	_put_device
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_hid_device_release,4,2         ; @hid_device_release
	.comm	_hid_bus_type,4,2               ; @hid_bus_type
	.comm	_HID_DEFAULT_NUM_COLLECTIONS,4,2 ; @HID_DEFAULT_NUM_COLLECTIONS
	.comm	_HID_REPORT_TYPES,4,2           ; @HID_REPORT_TYPES
.subsections_via_symbols
