	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __uhid_report_queue_and_wait
___uhid_report_queue_and_wait:          ## @__uhid_report_queue_and_wait
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	12(%rdi), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	24(%rbx), %rax
	incq	%rax
	movq	%rax, 24(%rbx)
	movq	%rax, (%r14)
	movq	(%r15), %rax
	incq	%rax
	movq	%rax, 16(%rbx)
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_uhid_queue
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	8(%rbx), %edi
	cmpl	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	xorl	%esi, %esi
	cmpl	$0, 4(%rbx)
	sete	%sil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %esi
LBB0_3:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %edx
	callq	_wait_event_interruptible_timeout
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$0, 4(%rbx)
	je	LBB0_6
## %bb.5:
	cmpl	$0, (%rbx)
	je	LBB0_7
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	movl	$0, (%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jns	LBB0_10
## %bb.8:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_HZ,4,2                         ## @HZ
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.no_dead_strip	___uhid_report_queue_and_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __uhid_report_queue_and_wait
___uhid_report_queue_and_wait:          ; @__uhid_report_queue_and_wait
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x21, x1
	mov	x19, x0
	add	x22, x0, #12
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #24]
	add	x8, x8, #1
	str	x8, [x19, #24]
	str	x8, [x20]
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x19, #16]
	mov	w20, #1
	str	w20, [x19]
	mov	x0, x19
	mov	x1, x21
	bl	_uhid_queue
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #8]
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, #0
	cset	w20, eq
LBB0_2:
Lloh0:
	adrp	x8, _HZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w2, w8, w8, lsl #2
	mov	x1, x20
	bl	_wait_event_interruptible_timeout
	cbz	w0, LBB0_5
; %bb.3:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_5
; %bb.4:
	ldr	w8, [x19]
	cbz	w8, LBB0_8
LBB0_5:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	str	wzr, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	tbnz	w0, #31, LBB0_10
; %bb.9:
	mov	w0, #0
	b	LBB0_7
LBB0_10:
Lloh5:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_HZ,4,2                         ; @HZ
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.no_dead_strip	___uhid_report_queue_and_wait
.subsections_via_symbols
