	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usbhid_parse
_usbhid_parse:                          ## @usbhid_parse
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	16(%rdi), %edi
	callq	_to_usb_interface
	movq	(%rax), %r13
	movq	%rax, %rdi
	callq	_interface_to_usbdev
	movq	%rax, %r14
	movl	4(%rax), %edi
	callq	_le16_to_cpu
	movq	%rax, %rbx
	movl	(%r14), %edi
	callq	_le16_to_cpu
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_usbhid_lookup_quirk
	movl	%eax, %r12d
	movq	_HID_QUIRK_IGNORE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_2:
	movq	(%r13), %rax
	movq	_USB_INTERFACE_SUBCLASS_BOOT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	movq	8(%r13), %rax
	movq	_USB_INTERFACE_PROTOCOL_KEYBOARD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_USB_INTERFACE_PROTOCOL_MOUSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_5:
	movq	_HID_QUIRK_NOGET@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
LBB0_6:
	movq	_HID_DT_HID@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	callq	_usb_get_extra_descriptor
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	cmpl	$0, 20(%r13)
	je	LBB0_9
## %bb.8:
	movq	24(%r13), %rdi
	movl	(%rbx), %esi
	leaq	-48(%rbp), %rdx
	callq	_usb_get_extra_descriptor
	testq	%rax, %rax
	je	LBB0_10
LBB0_9:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dbg_hid
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_10:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax
	movl	20(%rax), %edi
	callq	_le16_to_cpu
	movq	%rax, 8(%r15)
	movq	-48(%rbp), %rax
	movl	16(%rax), %ecx
	movl	%ecx, 4(%r15)
	xorl	%ebx, %ebx
	cmpl	$0, (%rax)
	movl	$0, %r14d
	jle	LBB0_21
## %bb.11:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movl	$8, %r13d
	movq	_HID_DT_REPORT@GOTPCREL(%rip), %r15
	xorl	%r14d, %r14d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r12
	movslq	(%rax), %rcx
	addq	$16, %r13
	cmpq	%rcx, %r12
	jge	LBB0_15
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rcx
	movq	-8(%rcx,%r13), %rdx
	cmpq	(%r15), %rdx
	jne	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	(%rcx,%r13), %edi
	callq	_le16_to_cpu
	movq	%rax, %r14
	movq	-48(%rbp), %rax
	jmp	LBB0_12
LBB0_15:
	testl	%r14d, %r14d
	je	LBB0_21
## %bb.16:
	movq	_HID_MAX_DESCRIPTOR_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	ja	LBB0_21
## %bb.17:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_24
## %bb.18:
	movq	%rax, %r13
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	16(%rbx), %esi
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_hid_set_idle
	movl	16(%rbx), %esi
	movq	(%r15), %rdx
	movq	%r12, %rdi
	movq	%r13, %rcx
	movl	%r14d, %r8d
	callq	_hid_get_class_descriptor
	testl	%eax, %eax
	js	LBB0_25
## %bb.19:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_hid_parse_report
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_kfree
	testl	%ebx, %ebx
	je	LBB0_26
## %bb.20:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg_hid
	jmp	LBB0_23
LBB0_21:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_dbg_hid
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_22:
	subl	(%rax), %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dbg_hid
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_25:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg_hid
	movq	%r13, %rdi
	callq	_kfree
	jmp	LBB0_23
LBB0_26:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	orl	%eax, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_HID_QUIRK_IGNORE,4,2           ## @HID_QUIRK_IGNORE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_USB_INTERFACE_SUBCLASS_BOOT,8,3 ## @USB_INTERFACE_SUBCLASS_BOOT
	.comm	_USB_INTERFACE_PROTOCOL_KEYBOARD,8,3 ## @USB_INTERFACE_PROTOCOL_KEYBOARD
	.comm	_USB_INTERFACE_PROTOCOL_MOUSE,8,3 ## @USB_INTERFACE_PROTOCOL_MOUSE
	.comm	_HID_QUIRK_NOGET,4,2            ## @HID_QUIRK_NOGET
	.comm	_HID_DT_HID,4,2                 ## @HID_DT_HID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"class descriptor not present\n"

	.comm	_HID_DT_REPORT,8,3              ## @HID_DT_REPORT
	.comm	_HID_MAX_DESCRIPTOR_SIZE,4,2    ## @HID_MAX_DESCRIPTOR_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"weird size of report descriptor (%u)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"couldn't allocate rdesc memory\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"reading report descriptor failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"parsing report descriptor failed\n"

	.no_dead_strip	_usbhid_parse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usbhid_parse
_usbhid_parse:                          ; @usbhid_parse
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	ldr	w0, [x0, #16]
	bl	_to_usb_interface
	ldr	x21, [x0]
	bl	_interface_to_usbdev
	mov	x22, x0
	ldr	w0, [x0, #4]
	bl	_le16_to_cpu
	mov	x20, x0
	ldr	w0, [x22]
	bl	_le16_to_cpu
	mov	x1, x0
	mov	x0, x20
	bl	_usbhid_lookup_quirk
Lloh0:
	adrp	x8, _HID_QUIRK_IGNORE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HID_QUIRK_IGNORE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_8
; %bb.1:
	mov	x20, x0
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _USB_INTERFACE_SUBCLASS_BOOT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _USB_INTERFACE_SUBCLASS_BOOT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x21, #8]
Lloh6:
	adrp	x9, _USB_INTERFACE_PROTOCOL_KEYBOARD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _USB_INTERFACE_PROTOCOL_KEYBOARD@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _USB_INTERFACE_PROTOCOL_MOUSE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _USB_INTERFACE_PROTOCOL_MOUSE@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _HID_QUIRK_NOGET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HID_QUIRK_NOGET@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w20, w8, w20
LBB0_4:
Lloh15:
	adrp	x23, _HID_DT_HID@GOTPAGE
Lloh16:
	ldr	x23, [x23, _HID_DT_HID@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #8
	mov	x0, x21
	bl	_usb_get_extra_descriptor
	cbz	x0, LBB0_11
; %bb.5:
	ldr	w8, [x21, #20]
	cbz	w8, LBB0_7
; %bb.6:
	ldr	x0, [x21, #24]
	ldr	w1, [x23]
	add	x2, sp, #8
	bl	_usb_get_extra_descriptor
	cbz	x0, LBB0_11
LBB0_7:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_hid
LBB0_8:
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_11:
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #20]
	bl	_le16_to_cpu
	str	x0, [x19, #8]
	ldr	x8, [sp, #8]
	ldr	w9, [x8, #16]
	str	w9, [x19, #4]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_22
; %bb.12:
	mov	x24, #0
	mov	x26, #0
	mov	w23, #0
Lloh21:
	adrp	x25, _HID_DT_REPORT@GOTPAGE
Lloh22:
	ldr	x25, [x25, _HID_DT_REPORT@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x26, x26, #1
	ldrsw	x9, [x8]
	add	x24, x24, #16
	cmp	x26, x9
	b.ge	LBB0_16
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, #8]
	ldr	x10, [x9, x24]
	ldr	x11, [x25]
	cmp	x10, x11
	b.ne	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x8, x9, x24
	ldr	w0, [x8, #8]
	bl	_le16_to_cpu
	mov	x23, x0
	ldr	x8, [sp, #8]
	b	LBB0_13
LBB0_16:
	cbz	w23, LBB0_23
; %bb.17:
Lloh23:
	adrp	x8, _HID_MAX_DESCRIPTOR_SIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HID_MAX_DESCRIPTOR_SIZE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w23, w8
	b.hi	LBB0_23
; %bb.18:
Lloh26:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_kmalloc
	cbz	x0, LBB0_24
; %bb.19:
	mov	x24, x0
	ldr	w1, [x21, #16]
	mov	x0, x22
	mov	w2, #0
	mov	w3, #0
	bl	_hid_set_idle
	ldr	w1, [x21, #16]
	ldr	x2, [x25]
	mov	x0, x22
	mov	x3, x24
	mov	x4, x23
	bl	_hid_get_class_descriptor
	tbnz	w0, #31, LBB0_25
; %bb.20:
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_hid_parse_report
	mov	x21, x0
	mov	x0, x24
	bl	_kfree
	cbz	w21, LBB0_26
; %bb.21:
Lloh29:
	adrp	x0, l_.str.4@PAGE
Lloh30:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_dbg_hid
	b	LBB0_10
LBB0_22:
	mov	w23, #0
LBB0_23:
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	str	x23, [sp]
Lloh31:
	adrp	x0, l_.str.1@PAGE
Lloh32:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dbg_hid
Lloh33:
	adrp	x8, _EINVAL@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_24:
Lloh35:
	adrp	x0, l_.str.2@PAGE
Lloh36:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dbg_hid
Lloh37:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_25:
	mov	x21, x0
Lloh39:
	adrp	x0, l_.str.3@PAGE
Lloh40:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dbg_hid
	mov	x0, x24
	bl	_kfree
	b	LBB0_10
LBB0_26:
	ldr	w8, [x19]
	orr	w8, w8, w20
	str	w8, [x19]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_HID_QUIRK_IGNORE,4,2           ; @HID_QUIRK_IGNORE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_USB_INTERFACE_SUBCLASS_BOOT,8,3 ; @USB_INTERFACE_SUBCLASS_BOOT
	.comm	_USB_INTERFACE_PROTOCOL_KEYBOARD,8,3 ; @USB_INTERFACE_PROTOCOL_KEYBOARD
	.comm	_USB_INTERFACE_PROTOCOL_MOUSE,8,3 ; @USB_INTERFACE_PROTOCOL_MOUSE
	.comm	_HID_QUIRK_NOGET,4,2            ; @HID_QUIRK_NOGET
	.comm	_HID_DT_HID,4,2                 ; @HID_DT_HID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"class descriptor not present\n"

	.comm	_HID_DT_REPORT,8,3              ; @HID_DT_REPORT
	.comm	_HID_MAX_DESCRIPTOR_SIZE,4,2    ; @HID_MAX_DESCRIPTOR_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"weird size of report descriptor (%u)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"couldn't allocate rdesc memory\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"reading report descriptor failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"parsing report descriptor failed\n"

	.no_dead_strip	_usbhid_parse
.subsections_via_symbols
