	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hid_add_usage
_hid_add_usage:                         ## @hid_add_usage
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	8(%rdi), %rcx
	movq	_HID_MAX_USAGES@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jae	LBB0_1
## %bb.2:
	movq	16(%rdi), %rax
	movl	%esi, (%rax,%rcx,4)
	movslq	(%rdi), %rdx
	xorl	%eax, %eax
	movl	$0, %esi
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.3:
	movq	32(%rdi), %rsi
	movl	-4(%rsi,%rdx,4), %esi
LBB0_4:
	movq	24(%rdi), %rdx
	movl	%esi, (%rdx,%rcx,4)
	incq	%rcx
	movq	%rcx, 8(%rdi)
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_dbg_hid
	movl	$-1, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HID_MAX_USAGES,8,3             ## @HID_MAX_USAGES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usage index exceeded\n"

	.no_dead_strip	_hid_add_usage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hid_add_usage
_hid_add_usage:                         ; @hid_add_usage
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x9, [x0, #8]
Lloh0:
	adrp	x8, _HID_MAX_USAGES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HID_MAX_USAGES@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, x8
	b.hs	LBB0_3
; %bb.1:
	ldr	x8, [x0, #16]
	str	w1, [x8, x9, lsl #2]
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.2:
	ldr	x10, [x0, #32]
	sub	w8, w8, #1
	ldr	w10, [x10, w8, sxtw #2]
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_hid
	mov	w8, #-1
	b	LBB0_6
LBB0_4:
	mov	w10, #0
LBB0_5:
	mov	w8, #0
	ldr	x11, [x0, #24]
	str	w10, [x11, x9, lsl #2]
	add	x9, x9, #1
	str	x9, [x0, #8]
LBB0_6:
	mov	x0, x8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HID_MAX_USAGES,8,3             ; @HID_MAX_USAGES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usage index exceeded\n"

	.no_dead_strip	_hid_add_usage
.subsections_via_symbols
