	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_signal_event
_create_signal_event:                   ## @create_signal_event
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movl	(%rsi), %eax
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	cmpl	%ecx, 4(%r15)
	jne	LBB0_5
## %bb.2:
	cmpl	$0, 8(%r15)
	jne	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
	movl	$1, 8(%r15)
LBB0_4:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_allocate_event_notification_slot
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_warn
	jmp	LBB0_8
LBB0_7:
	movl	4(%r15), %esi
	incl	%esi
	movl	%esi, 4(%r15)
	movq	16(%r15), %rax
	movq	(%r14), %rdx
	leaq	(,%rdx,4), %rcx
	addq	(%rax), %rcx
	movq	%rcx, 8(%r14)
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_debug
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Signal event wasn't created because limit was reached\n"

	.comm	_ENOSPC,4,2                     ## @ENOSPC
L_.str.1:                               ## @.str.1
	.asciz	"Signal event wasn't created because out of kernel memory\n"

L_.str.2:                               ## @.str.2
	.asciz	"Signal event number %zu created with id %d, address %p\n"

	.no_dead_strip	_create_signal_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_signal_event
_create_signal_event:                   ; @create_signal_event
	.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	x19, x1
	ldr	w8, [x1]
	cbz	w8, LBB0_5
; %bb.1:
	ldr	w9, [x19, #4]
	add	w10, w8, #7
	cmp	w8, #0
	csel	w8, w10, w8, lt
	cmp	w9, w8, asr #3
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_4
; %bb.3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_4:
Lloh2:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	bl	_allocate_event_notification_slot
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.6:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
	b	LBB0_8
LBB0_7:
	ldr	w8, [x19, #4]
	add	w1, w8, #1
	str	w1, [x19, #4]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x2, [x20]
	add	x3, x8, x2, lsl #2
	str	x3, [x20, #8]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug
LBB0_8:
	mov	x0, x21
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Signal event wasn't created because limit was reached\n"

	.comm	_ENOSPC,4,2                     ; @ENOSPC
l_.str.1:                               ; @.str.1
	.asciz	"Signal event wasn't created because out of kernel memory\n"

l_.str.2:                               ; @.str.2
	.asciz	"Signal event number %zu created with id %d, address %p\n"

	.no_dead_strip	_create_signal_event
.subsections_via_symbols
