	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eloop_register_event           ## -- Begin function eloop_register_event
	.p2align	4, 0x90
_eloop_register_event:                  ## @eloop_register_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	%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
	movl	$-1, %ebx
	cmpq	$8, %rsi
	jne	LBB0_5
## %bb.1:
	movq	%rdi, %r13
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	je	LBB0_5
## %bb.2:
	movq	%r8, %r14
	movq	%rcx, %r15
	movl	%edx, %r12d
	xorl	%eax, %eax
	callq	_eloop_prepare_handles
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movq	_eloop@GOTPCREL(%rip), %rax
	movq	8(%rax), %rdi
	movl	(%rax), %esi
	incl	%esi
	movl	$32, %edx
	callq	_os_realloc_array
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_eloop@GOTPCREL(%rip), %rsi
	movslq	(%rsi), %rcx
	leal	1(%rcx), %edx
	shlq	$5, %rcx
	movq	%r15, 24(%rax,%rcx)
	movq	%r14, 16(%rax,%rcx)
	movl	%r12d, 8(%rax,%rcx)
	movq	%r13, (%rax,%rcx)
	movl	%edx, (%rsi)
	movq	%rax, 8(%rsi)
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.comm	_eloop,16,3                     ## @eloop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eloop_register_event           ; -- Begin function eloop_register_event
	.p2align	2
_eloop_register_event:                  ; @eloop_register_event
	.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	x21, x0
	mov	w0, #-1
	cmp	x1, #8
	b.ne	LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x21
	b.eq	LBB0_6
; %bb.2:
	mov	x19, x4
	mov	x22, x3
	mov	x20, x2
	bl	_eloop_prepare_handles
	cbz	x0, LBB0_4
LBB0_3:
	mov	w0, #-1
	b	LBB0_6
LBB0_4:
Lloh3:
	adrp	x23, _eloop@GOTPAGE
Lloh4:
	ldr	x23, [x23, _eloop@GOTPAGEOFF]
	ldr	x0, [x23, #8]
	ldr	w8, [x23]
	add	w1, w8, #1
	mov	w2, #32
	bl	_os_realloc_array
	cbz	x0, LBB0_3
; %bb.5:
	mov	x8, x0
	mov	w0, #0
	ldrsw	x9, [x23]
	add	x10, x8, x9, lsl #5
	stp	x19, x22, [x10, #16]
	str	w20, [x10, #8]
	str	x21, [x10]
	add	w9, w9, #1
	str	w9, [x23]
	str	x8, [x23, #8]
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.comm	_eloop,16,3                     ; @eloop
.subsections_via_symbols
