	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hid_submit_ctrl
_hid_submit_ctrl:                       ## @hid_submit_ctrl
	.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), %r13
	movq	(%r13), %rax
	movq	40(%r13), %rcx
	leaq	(%rax,%rax,2), %rax
	movq	16(%rcx,%rax,8), %rdx
	movq	(%rcx,%rax,8), %rsi
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %ebx
	decl	%ebx
	sarl	$3, %ebx
	xorl	%r15d, %r15d
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	cmpl	$0, 4(%rdx)
	movb	8(%rcx,%rax,8), %r14b
	setg	%r15b
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rax
	movb	(%rax), %r12b
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_hid_to_usb_dev
	addl	%ebx, %r15d
	incl	%r15d
	movb	%r14b, -41(%rbp)                ## 1-byte Spill
	cmpb	%r12b, %r14b
	jne	LBB0_3
## %bb.1:
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	24(%r13), %rcx
	movl	%eax, 8(%rcx)
	movl	%r15d, (%rcx)
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_6
## %bb.2:
	movl	48(%r13), %edi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_kfree
	movq	(%r13), %rax
	movq	40(%r13), %rcx
	leaq	(%rax,%rax,2), %rax
	movq	$0, (%rcx,%rax,8)
	jmp	LBB0_6
LBB0_3:
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movq	24(%r13), %rcx
	movl	%eax, 8(%rcx)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_hid_to_usb_dev
	movq	24(%r13), %rcx
	movl	8(%rcx), %esi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_usb_maxpacket
	testl	%eax, %eax
	jle	LBB0_5
## %bb.4:
	movl	%eax, %r12d
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %ebx
	imull	%r12d, %ebx
	movl	8(%r13), %eax
	cmpl	%eax, %ebx
	cmovgel	%eax, %ebx
LBB0_5:
	movq	24(%r13), %rax
	movl	%ebx, (%rax)
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_6:
	movq	%r14, %rdi
	callq	_hid_to_usb_dev
	movq	24(%r13), %rcx
	movl	%eax, 4(%rcx)
	movq	_USB_TYPE_CLASS@GOTPCREL(%rip), %rax
	movq	_USB_RECIP_INTERFACE@GOTPCREL(%rip), %rcx
	movb	(%rax), %dl
	movb	-41(%rbp), %bl                  ## 1-byte Reload
	orb	%bl, %dl
	orb	(%rcx), %dl
	movq	32(%r13), %rax
	movb	%dl, (%rax)
	movq	_HID_REQ_SET_REPORT@GOTPCREL(%rip), %r14
	movq	%r14, %rcx
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rdx
	cmpb	(%rdx), %bl
	je	LBB0_8
## %bb.7:
	movq	_HID_REQ_GET_REPORT@GOTPCREL(%rip), %rcx
LBB0_8:
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rax)
	movl	8(%r12), %edi
	shll	$8, %edi
	addl	$256, %edi                      ## imm = 0x100
	orl	4(%r12), %edi
	callq	_cpu_to_le16
	movq	32(%r13), %rcx
	movq	%rax, 32(%rcx)
	movl	12(%r13), %edi
	callq	_cpu_to_le16
	movq	32(%r13), %rcx
	movq	%rax, 24(%rcx)
	movl	%r15d, %edi
	callq	_cpu_to_le16
	movq	32(%r13), %rdx
	movq	%rax, 16(%rdx)
	movq	8(%rdx), %rsi
	movq	24(%rdx), %rcx
	cmpq	(%r14), %rsi
	leaq	L_.str.1(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rdi, %rsi
	movq	32(%rdx), %rdx
	leaq	L_.str(%rip), %rdi
	movq	%rax, %r8
	callq	_dbg_hid
	movq	24(%r13), %rdi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_submit_urb
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_9:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_hid_err
LBB0_11:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_DIR_OUT,1,0                ## @USB_DIR_OUT
	.comm	_USB_TYPE_CLASS,1,0             ## @USB_TYPE_CLASS
	.comm	_USB_RECIP_INTERFACE,1,0        ## @USB_RECIP_INTERFACE
	.comm	_HID_REQ_SET_REPORT,8,3         ## @HID_REQ_SET_REPORT
	.comm	_HID_REQ_GET_REPORT,8,3         ## @HID_REQ_GET_REPORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"submitting ctrl urb: %s wValue=0x%04x wIndex=0x%04x wLength=%u\n"

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

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

	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.3:                               ## @.str.3
	.asciz	"usb_submit_urb(ctrl) failed: %d\n"

	.comm	_jiffies,4,2                    ## @jiffies
	.no_dead_strip	_hid_submit_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hid_submit_ctrl
_hid_submit_ctrl:                       ; @hid_submit_ctrl
	.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	x19, x0
	ldr	x22, [x0]
	ldr	x8, [x22, #40]
	ldr	x9, [x22]
	mov	w10, #24
	madd	x8, x9, x10, x8
	ldr	x23, [x8, #16]
	ldr	x21, [x8]
	ldrb	w24, [x8, #8]
	ldp	w8, w9, [x23]
	sub	w8, w8, #1
	asr	w8, w8, #3
	cmp	w9, #0
	cinc	w8, w8, gt
	add	w20, w8, #1
Lloh0:
	adrp	x25, _USB_DIR_OUT@GOTPAGE
Lloh1:
	ldr	x25, [x25, _USB_DIR_OUT@GOTPAGEOFF]
	ldrb	w26, [x25]
	bl	_hid_to_usb_dev
	cmp	w24, w26
	b.ne	LBB0_3
; %bb.1:
	mov	w1, #0
	bl	_usb_sndctrlpipe
	ldr	x8, [x22, #24]
	str	w0, [x8, #8]
	str	w20, [x8]
	cbz	x21, LBB0_7
; %bb.2:
	ldr	w0, [x22, #48]
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
	mov	x0, x21
	bl	_kfree
	ldr	x8, [x22, #40]
	ldr	x9, [x22]
	mov	w10, #24
	mul	x9, x9, x10
	str	xzr, [x8, x9]
	b	LBB0_7
LBB0_3:
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	ldr	x8, [x22, #24]
	str	w0, [x8, #8]
	mov	x0, x19
	bl	_hid_to_usb_dev
	ldr	x8, [x22, #24]
	ldr	w1, [x8, #8]
	mov	w2, #0
	bl	_usb_maxpacket
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.4:
	mov	x21, x0
	mov	x0, x20
	mov	x1, x21
	bl	_DIV_ROUND_UP
	mul	w8, w0, w21
	ldr	w9, [x22, #8]
	cmp	w8, w9
	csel	w8, w8, w9, lt
	b	LBB0_6
LBB0_5:
	mov	w8, #0
LBB0_6:
	ldr	x9, [x22, #24]
	str	w8, [x9]
LBB0_7:
	mov	x0, x19
	bl	_hid_to_usb_dev
	ldp	x8, x9, [x22, #24]
	str	w0, [x8, #4]
Lloh2:
	adrp	x8, _USB_TYPE_CLASS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USB_TYPE_CLASS@GOTPAGEOFF]
	ldrb	w8, [x8]
Lloh4:
	adrp	x10, _USB_RECIP_INTERFACE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _USB_RECIP_INTERFACE@GOTPAGEOFF]
	ldrb	w10, [x10]
	orr	w8, w8, w24
	orr	w8, w8, w10
	strb	w8, [x9]
Lloh6:
	adrp	x21, _HID_REQ_SET_REPORT@GOTPAGE
Lloh7:
	ldr	x21, [x21, _HID_REQ_SET_REPORT@GOTPAGEOFF]
	ldrb	w8, [x25]
Lloh8:
	adrp	x10, _HID_REQ_GET_REPORT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _HID_REQ_GET_REPORT@GOTPAGEOFF]
	cmp	w24, w8
	csel	x8, x21, x10, eq
	ldr	x8, [x8]
	str	x8, [x9, #8]
	ldp	w9, w8, [x23, #4]
	lsl	w8, w8, #8
	add	w8, w8, #256
	orr	w0, w8, w9
	bl	_cpu_to_le16
	ldr	x8, [x22, #32]
	str	x0, [x8, #32]
	ldr	w0, [x22, #12]
	bl	_cpu_to_le16
	ldr	x8, [x22, #32]
	str	x0, [x8, #24]
	mov	x0, x20
	bl	_cpu_to_le16
	mov	x4, x0
	ldr	x8, [x22, #32]
	str	x0, [x8, #16]
	ldr	x9, [x8, #8]
	ldr	x10, [x21]
Lloh10:
	adrp	x11, l_.str.2@PAGE
Lloh11:
	add	x11, x11, l_.str.2@PAGEOFF
Lloh12:
	adrp	x12, l_.str.1@PAGE
Lloh13:
	add	x12, x12, l_.str.1@PAGEOFF
	cmp	x9, x10
	csel	x1, x12, x11, eq
	ldp	x3, x2, [x8, #24]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_hid
	ldr	x0, [x22, #24]
Lloh16:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_usb_submit_urb
	tbnz	w0, #31, LBB0_9
; %bb.8:
	mov	w20, #0
Lloh19:
	adrp	x8, _jiffies@GOTPAGE
Lloh20:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x22, #16]
	b	LBB0_10
LBB0_9:
	mov	x20, x0
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_hid_err
LBB0_10:
	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 AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_DIR_OUT,1,0                ; @USB_DIR_OUT
	.comm	_USB_TYPE_CLASS,1,0             ; @USB_TYPE_CLASS
	.comm	_USB_RECIP_INTERFACE,1,0        ; @USB_RECIP_INTERFACE
	.comm	_HID_REQ_SET_REPORT,8,3         ; @HID_REQ_SET_REPORT
	.comm	_HID_REQ_GET_REPORT,8,3         ; @HID_REQ_GET_REPORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"submitting ctrl urb: %s wValue=0x%04x wIndex=0x%04x wLength=%u\n"

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

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

	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.3:                               ; @.str.3
	.asciz	"usb_submit_urb(ctrl) failed: %d\n"

	.comm	_jiffies,4,2                    ; @jiffies
	.no_dead_strip	_hid_submit_ctrl
.subsections_via_symbols
