	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lookup_signaled_event_by_partial_id
_lookup_signaled_event_by_partial_id:   ## @lookup_signaled_event_by_partial_id
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_1
## %bb.3:
	movl	%esi, %ebx
	movq	_KFD_SIGNAL_EVENT_LIMIT@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	cmpl	%esi, %eax
	jle	LBB0_1
## %bb.4:
	cmpl	$31, %edx
	jg	LBB0_9
## %bb.5:
	movl	$1, %r12d
	movl	%edx, %ecx
	shll	%cl, %r12d
	cmpl	%eax, %r12d
	jae	LBB0_9
## %bb.6:
	movq	_UNSIGNALED_EVENT_SLOT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	callq	_page_slots
	movslq	%ebx, %rcx
	movq	(%rax,%rcx,8), %rax
	cmpq	(%r13), %rax
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_idr_find
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	addl	%r12d, %ebx
	cmpl	(%r15), %ebx
	jge	LBB0_2
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	testq	%rax, %rax
	jne	LBB0_2
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	4(%r14), %edi
	jmp	LBB0_7
LBB0_9:
	callq	_page_slots
	movslq	%ebx, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_UNSIGNALED_EVENT_SLOT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_1:
	xorl	%eax, %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r14, %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_idr_find                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_KFD_SIGNAL_EVENT_LIMIT,4,2     ## @KFD_SIGNAL_EVENT_LIMIT
	.comm	_UNSIGNALED_EVENT_SLOT,8,3      ## @UNSIGNALED_EVENT_SLOT
	.no_dead_strip	_lookup_signaled_event_by_partial_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lookup_signaled_event_by_partial_id
_lookup_signaled_event_by_partial_id:   ; @lookup_signaled_event_by_partial_id
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	w0, [x0, #4]
	cbz	w0, LBB0_11
; %bb.1:
	mov	x19, x1
Lloh0:
	adrp	x21, _KFD_SIGNAL_EVENT_LIMIT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _KFD_SIGNAL_EVENT_LIMIT@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, w1
	b.le	LBB0_11
; %bb.2:
	cmp	w2, #31
	b.gt	LBB0_10
; %bb.3:
	mov	w9, #1
	lsl	w22, w9, w2
	cmp	w22, w8
	b.hs	LBB0_10
; %bb.4:
Lloh2:
	adrp	x23, _UNSIGNALED_EVENT_SLOT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _UNSIGNALED_EVENT_SLOT@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	bl	_page_slots
	ldr	x8, [x0, w19, sxtw #3]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_idr_find
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	add	w19, w19, w22
	cmp	w19, w8
	ccmp	x0, #0, #0, lt
	b.ne	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x20, #4]
	b	LBB0_5
LBB0_10:
	bl	_page_slots
	ldr	x8, [x0, w19, sxtw #3]
Lloh4:
	adrp	x9, _UNSIGNALED_EVENT_SLOT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _UNSIGNALED_EVENT_SLOT@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
LBB0_11:
	mov	x0, #0
LBB0_12:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x0, x20
	mov	x1, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_idr_find
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_KFD_SIGNAL_EVENT_LIMIT,4,2     ; @KFD_SIGNAL_EVENT_LIMIT
	.comm	_UNSIGNALED_EVENT_SLOT,8,3      ; @UNSIGNALED_EVENT_SLOT
	.no_dead_strip	_lookup_signaled_event_by_partial_id
.subsections_via_symbols
