	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidinput_allocate
_hidinput_allocate:                     ## @hidinput_allocate
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$32, %edi
	callq	_kzalloc
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_input_allocate_device
	movq	%rax, %rbx
	testq	%r12, %r12
	je	LBB0_13
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.2:
	movq	_HID_QUIRK_INPUT_PER_APP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_10
## %bb.3:
	cmpl	$2, 4(%r14)
	jl	LBB0_10
## %bb.4:
	leal	-128(%r15), %eax
	cmpl	$9, %eax
	ja	LBB0_10
## %bb.5:
	cltq
	leaq	l_switch.table.hidinput_allocate(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_strlen
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_strlen
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rax, %rcx
	jae	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	%rcx, %rdi
	subq	%rax, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	8(%r14), %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_9:
	movl	(%r13), %edi
	leaq	L_.str.10(%rip), %rsi
	callq	_kasprintf
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_13
LBB0_10:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_input_set_drvdata
	movq	_hidinput_input_event@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	_hidinput_open@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movq	_hidinput_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_hidinput_setkeycode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_hidinput_getkeycode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	(%r12), %rax
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:
	movq	8(%r14), %rax
LBB0_12:
	movq	%rax, (%rbx)
	movl	44(%r14), %eax
	movl	%eax, 36(%rbx)
	movl	40(%r14), %eax
	movl	%eax, 32(%rbx)
	movups	24(%r14), %xmm0
	movups	%xmm0, 16(%rbx)
	leaq	20(%r14), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, 24(%r12)
	movl	%r15d, 8(%r12)
	leaq	16(%r12), %rdi
	addq	$16, %r14
	movq	%r14, %rsi
	callq	_list_add_tail
	movq	%r12, %rdi
	addq	$12, %rdi
	callq	_INIT_LIST_HEAD
	jmp	LBB0_14
LBB0_13:
	movq	%r12, %rdi
	callq	_kfree
	movq	%rbx, %rdi
	callq	_input_free_device
	leaq	L_.str.11(%rip), %rsi
	movq	%r14, %rdi
	callq	_hid_err
	xorl	%r12d, %r12d
LBB0_14:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_HID_QUIRK_INPUT_PER_APP,4,2    ## @HID_QUIRK_INPUT_PER_APP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Keyboard"

L_.str.1:                               ## @.str.1
	.asciz	"Keypad"

L_.str.2:                               ## @.str.2
	.asciz	"Mouse"

L_.str.3:                               ## @.str.3
	.asciz	"Pen"

L_.str.4:                               ## @.str.4
	.asciz	"Touchscreen"

L_.str.5:                               ## @.str.5
	.asciz	"Touchpad"

L_.str.6:                               ## @.str.6
	.asciz	"System Control"

L_.str.7:                               ## @.str.7
	.asciz	"Consumer Control"

L_.str.8:                               ## @.str.8
	.asciz	"Wireless Radio Control"

L_.str.9:                               ## @.str.9
	.asciz	"System Multi Axis"

L_.str.10:                              ## @.str.10
	.asciz	"%s %s"

	.comm	_hidinput_input_event,4,2       ## @hidinput_input_event
	.comm	_hidinput_open,4,2              ## @hidinput_open
	.comm	_hidinput_close,4,2             ## @hidinput_close
	.comm	_hidinput_setkeycode,4,2        ## @hidinput_setkeycode
	.comm	_hidinput_getkeycode,4,2        ## @hidinput_getkeycode
L_.str.11:                              ## @.str.11
	.asciz	"Out of memory during hid input probe\n"

	.no_dead_strip	_hidinput_allocate
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.hidinput_allocate
l_switch.table.hidinput_allocate:
	.quad	L_.str.8
	.quad	L_.str.9
	.quad	L_.str.6
	.quad	L_.str.2
	.quad	L_.str.1
	.quad	L_.str
	.quad	L_.str.4
	.quad	L_.str.5
	.quad	L_.str.3
	.quad	L_.str.7

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidinput_allocate
_hidinput_allocate:                     ; @hidinput_allocate
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x26, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x26, [x26, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	w0, #32
	bl	_kzalloc
	mov	x20, x0
	bl	_input_allocate_device
	mov	x22, x0
	cmp	x20, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
LBB0_1:
	mov	x0, x20
	bl	_kfree
	mov	x0, x22
	bl	_input_free_device
Lloh2:
	adrp	x1, l_.str.11@PAGE
Lloh3:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x19
	bl	_hid_err
	mov	x20, #0
	b	LBB0_12
LBB0_2:
	ldr	w8, [x19]
Lloh4:
	adrp	x9, _HID_QUIRK_INPUT_PER_APP@GOTPAGE
Lloh5:
	ldr	x9, [x9, _HID_QUIRK_INPUT_PER_APP@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.3:
	ldr	w8, [x19, #4]
	cmp	w8, #2
	b.lt	LBB0_9
; %bb.4:
	sub	w8, w21, #128
	cmp	w8, #9
	b.hi	LBB0_9
; %bb.5:
Lloh7:
	adrp	x9, l_switch.table.hidinput_allocate@PAGE
Lloh8:
	add	x9, x9, l_switch.table.hidinput_allocate@PAGEOFF
	ldr	x23, [x9, w8, sxtw #3]
	ldr	x24, [x19, #8]
	mov	x0, x24
	bl	_strlen
	mov	x25, x0
	mov	x0, x23
	bl	_strlen
	cmp	x25, x0
	b.lo	LBB0_8
; %bb.6:
	add	x8, x24, x25
	sub	x0, x8, x0
	mov	x1, x23
	bl	_strcmp
	cbz	x0, LBB0_9
; %bb.7:
	ldr	x24, [x19, #8]
LBB0_8:
	ldr	w0, [x26]
Lloh9:
	adrp	x1, l_.str.10@PAGE
Lloh10:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x2, x24
	mov	x3, x23
	bl	_kasprintf
	str	x0, [x20]
	cbz	x0, LBB0_1
LBB0_9:
	mov	x0, x22
	mov	x1, x19
	bl	_input_set_drvdata
Lloh11:
	adrp	x8, _hidinput_input_event@GOTPAGE
Lloh12:
	ldr	x8, [x8, _hidinput_input_event@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x22, #56]
Lloh14:
	adrp	x8, _hidinput_open@GOTPAGE
Lloh15:
	ldr	x8, [x8, _hidinput_open@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _hidinput_close@GOTPAGE
Lloh18:
	ldr	x9, [x9, _hidinput_close@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #48]
Lloh20:
	adrp	x8, _hidinput_setkeycode@GOTPAGE
Lloh21:
	ldr	x8, [x8, _hidinput_setkeycode@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _hidinput_getkeycode@GOTPAGE
Lloh24:
	ldr	x9, [x9, _hidinput_getkeycode@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #40]
	ldr	x8, [x20]
	cbnz	x8, LBB0_11
; %bb.10:
	ldr	x8, [x19, #8]
LBB0_11:
	ldr	d0, [x19, #40]
	str	d0, [x22, #32]
	ldur	q0, [x19, #24]
	str	q0, [x22, #16]
	add	x9, x19, #20
	stp	x8, x9, [x22]
	str	x22, [x20, #24]
	str	w21, [x20, #8]
	add	x0, x20, #16
	add	x1, x19, #16
	bl	_list_add_tail
	add	x0, x20, #12
	bl	_INIT_LIST_HEAD
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_HID_QUIRK_INPUT_PER_APP,4,2    ; @HID_QUIRK_INPUT_PER_APP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Keyboard"

l_.str.1:                               ; @.str.1
	.asciz	"Keypad"

l_.str.2:                               ; @.str.2
	.asciz	"Mouse"

l_.str.3:                               ; @.str.3
	.asciz	"Pen"

l_.str.4:                               ; @.str.4
	.asciz	"Touchscreen"

l_.str.5:                               ; @.str.5
	.asciz	"Touchpad"

l_.str.6:                               ; @.str.6
	.asciz	"System Control"

l_.str.7:                               ; @.str.7
	.asciz	"Consumer Control"

l_.str.8:                               ; @.str.8
	.asciz	"Wireless Radio Control"

l_.str.9:                               ; @.str.9
	.asciz	"System Multi Axis"

l_.str.10:                              ; @.str.10
	.asciz	"%s %s"

	.comm	_hidinput_input_event,4,2       ; @hidinput_input_event
	.comm	_hidinput_open,4,2              ; @hidinput_open
	.comm	_hidinput_close,4,2             ; @hidinput_close
	.comm	_hidinput_setkeycode,4,2        ; @hidinput_setkeycode
	.comm	_hidinput_getkeycode,4,2        ; @hidinput_getkeycode
l_.str.11:                              ; @.str.11
	.asciz	"Out of memory during hid input probe\n"

	.no_dead_strip	_hidinput_allocate
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.hidinput_allocate
l_switch.table.hidinput_allocate:
	.quad	l_.str.8
	.quad	l_.str.9
	.quad	l_.str.6
	.quad	l_.str.2
	.quad	l_.str.1
	.quad	l_.str
	.quad	l_.str.4
	.quad	l_.str.5
	.quad	l_.str.3
	.quad	l_.str.7

.subsections_via_symbols
