	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hid_get_report_desc            ## -- Begin function hid_get_report_desc
	.p2align	4, 0x90
_hid_get_report_desc:                   ## @hid_get_report_desc
	.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	%edi, %r15d
	leaq	-56(%rbp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	xorl	%edi, %edi
	callq	_hid_pass_ptr
	movq	%rax, -48(%rbp)
	movl	$65535, -56(%rbp)               ## imm = 0xFFFF
	movq	_USB_GET_REPORT_DESC@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	%r15d, %edi
	movq	%rbx, %rdx
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_11
## %bb.1:
	movl	-52(%rbp), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_hid_pass_ptr
	movq	%rax, -48(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, -56(%rbp)
	movl	(%r13), %esi
	leaq	-56(%rbp), %rdx
	movl	%r15d, %edi
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_9
## %bb.3:
	movl	-52(%rbp), %esi
	testl	%esi, %esi
	jle	LBB0_9
## %bb.4:
	leal	-1(%rsi), %eax
	cmpb	$-64, (%r14,%rax)
	jne	LBB0_9
## %bb.5:
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_hid_use_report_desc
	movq	%rax, %r12
	jmp	LBB0_10
LBB0_9:
	xorl	%r12d, %r12d
LBB0_10:
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_11
LBB0_6:
	xorl	%r12d, %r12d
LBB0_11:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_GET_REPORT_DESC,4,2        ## @USB_GET_REPORT_DESC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hid_get_report_desc            ; -- Begin function hid_get_report_desc
	.p2align	2
_hid_get_report_desc:                   ; @hid_get_report_desc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	x0, #0
	bl	_hid_pass_ptr
	str	x0, [sp, #8]
	mov	w8, #65535
	str	w8, [sp]
Lloh0:
	adrp	x21, _USB_GET_REPORT_DESC@GOTPAGE
Lloh1:
	ldr	x21, [x21, _USB_GET_REPORT_DESC@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x2, sp
	mov	x0, x20
	bl	_ioctl
	tbnz	x0, #63, LBB0_6
; %bb.1:
	ldr	w0, [sp, #4]
	bl	_malloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x19, x0
	bl	_hid_pass_ptr
	str	x0, [sp, #8]
	ldr	w8, [sp, #4]
	str	w8, [sp]
	ldr	w1, [x21]
	mov	x2, sp
	mov	x0, x20
	bl	_ioctl
	tbnz	x0, #63, LBB0_7
; %bb.3:
	ldr	w1, [sp, #4]
	subs	w8, w1, #1
	b.lt	LBB0_7
; %bb.4:
	ldrb	w8, [x19, w8, uxtw]
	cmp	w8, #192
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_hid_use_report_desc
	mov	x20, x0
	b	LBB0_8
LBB0_6:
	mov	x20, #0
	b	LBB0_9
LBB0_7:
	mov	x20, #0
LBB0_8:
	mov	x0, x19
	bl	_free
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_GET_REPORT_DESC,4,2        ; @USB_GET_REPORT_DESC
.subsections_via_symbols
