	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_nonpersist_readd
_test_nonpersist_readd:                 ## @test_nonpersist_readd
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	L_.str(%rip), %rdi
	callq	_setup_test
	movq	_pair@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	(%rax), %esi
	movq	_EV_READ@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_re_add_read_cb@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	leaq	-56(%rbp), %r14
	leaq	-48(%rbp), %rbx
	movq	%r14, %rdi
	movq	%rbx, %r8
	callq	_event_set
	movq	(%r12), %rax
	movl	4(%rax), %esi
	movl	(%r15), %edx
	movl	(%r13), %ecx
	movq	%rbx, %rdi
	movq	%r14, %r8
	callq	_event_set
	movq	(%r12), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$5, %edx
	callq	_write
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str.2(%rip), %rdi
	callq	_tt_fail_perror
LBB0_2:
	movq	(%r12), %rax
	movl	4(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$5, %edx
	callq	_write
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.3(%rip), %rdi
	callq	_tt_fail_perror
LBB0_4:
	leaq	-56(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_event_add
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.5:
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	callq	_event_add
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.7:
	movq	_test_ok@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_8
	jmp	LBB0_17
LBB0_6:
	movq	_test_ok@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
LBB0_8:
	movq	_EVLOOP_ONCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_event_loop
	movq	_test_ok@GOTPCREL(%rip), %r14
	cmpl	$2, (%r14)
	jne	LBB0_17
## %bb.9:
	movq	_readd_test_event_last_added@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.10:
	movl	(%r15), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_event_pending
	cmpq	%r12, %rbx
	je	LBB0_11
## %bb.13:
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:
	movl	(%r15), %esi
	leaq	-48(%rbp), %rdi
	xorl	%edx, %edx
	callq	_event_pending
	testq	%rax, %rax
	jne	LBB0_16
	jmp	LBB0_15
LBB0_11:
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	movl	(%r15), %esi
	leaq	-48(%rbp), %rdi
	xorl	%edx, %edx
	callq	_event_pending
	testq	%rax, %rax
	je	LBB0_16
LBB0_15:
	movl	$0, (%r14)
LBB0_16:
	leaq	-56(%rbp), %rdi
	callq	_event_del
	leaq	-48(%rbp), %rdi
	callq	_event_del
	xorl	%eax, %eax
	callq	_cleanup_test
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Re-add nonpersistent events: "

	.comm	_pair,8,3                       ## @pair
	.comm	_EV_READ,4,2                    ## @EV_READ
	.comm	_re_add_read_cb,4,2             ## @re_add_read_cb
L_.str.1:                               ## @.str.1
	.asciz	"Hello"

L_.str.2:                               ## @.str.2
	.asciz	"write(pair[0])"

L_.str.3:                               ## @.str.3
	.asciz	"write(pair[1])\n"

	.comm	_test_ok,4,2                    ## @test_ok
	.comm	_EVLOOP_ONCE,4,2                ## @EVLOOP_ONCE
	.comm	_readd_test_event_last_added,8,3 ## @readd_test_event_last_added
	.no_dead_strip	_test_nonpersist_readd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_nonpersist_readd
_test_nonpersist_readd:                 ; @test_nonpersist_readd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_setup_test
Lloh2:
	adrp	x20, _pair@GOTPAGE
Lloh3:
	ldr	x20, [x20, _pair@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	w1, [x8]
Lloh4:
	adrp	x19, _EV_READ@GOTPAGE
Lloh5:
	ldr	x19, [x19, _EV_READ@GOTPAGEOFF]
	ldr	w2, [x19]
Lloh6:
	adrp	x21, _re_add_read_cb@GOTPAGE
Lloh7:
	ldr	x21, [x21, _re_add_read_cb@GOTPAGEOFF]
	ldr	w3, [x21]
	add	x0, sp, #8
	mov	x4, sp
	bl	_event_set
	ldr	x8, [x20]
	ldr	w1, [x8, #4]
	ldr	w2, [x19]
	ldr	w3, [x21]
	mov	x0, sp
	add	x4, sp, #8
	bl	_event_set
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #5
	bl	_write
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_tt_fail_perror
LBB0_2:
	ldr	x8, [x20]
	ldr	w0, [x8, #4]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #5
	bl	_write
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_tt_fail_perror
LBB0_4:
	add	x0, sp, #8
	mov	x1, #0
	bl	_event_add
Lloh16:
	adrp	x20, _test_ok@GOTPAGE
Lloh17:
	ldr	x20, [x20, _test_ok@GOTPAGEOFF]
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.5:
	mov	x0, sp
	mov	x1, #0
	bl	_event_add
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.6:
	ldr	w8, [x20]
	cbz	w8, LBB0_8
	b	LBB0_17
LBB0_7:
	str	wzr, [x20]
LBB0_8:
Lloh18:
	adrp	x8, _EVLOOP_ONCE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EVLOOP_ONCE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_event_loop
	ldr	w8, [x20]
	cmp	w8, #2
	b.ne	LBB0_17
; %bb.9:
Lloh21:
	adrp	x8, _readd_test_event_last_added@GOTPAGE
Lloh22:
	ldr	x8, [x8, _readd_test_event_last_added@GOTPAGEOFF]
Lloh23:
	ldr	x21, [x8]
	cbz	x21, LBB0_15
; %bb.10:
	ldr	w1, [x19]
	add	x22, sp, #8
	add	x0, sp, #8
	mov	x2, #0
	bl	_event_pending
	cmp	x21, x22
	b.eq	LBB0_13
; %bb.11:
	cbnz	x0, LBB0_15
; %bb.12:
	ldr	w1, [x19]
	mov	x0, sp
	mov	x2, #0
	bl	_event_pending
	cbnz	x0, LBB0_16
	b	LBB0_15
LBB0_13:
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w1, [x19]
	mov	x0, sp
	mov	x2, #0
	bl	_event_pending
	cbz	x0, LBB0_16
LBB0_15:
	str	wzr, [x20]
LBB0_16:
	add	x0, sp, #8
	bl	_event_del
	mov	x0, sp
	bl	_event_del
	bl	_cleanup_test
	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
	add	sp, sp, #64
	ret
LBB0_17:
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Re-add nonpersistent events: "

	.comm	_pair,8,3                       ; @pair
	.comm	_EV_READ,4,2                    ; @EV_READ
	.comm	_re_add_read_cb,4,2             ; @re_add_read_cb
l_.str.1:                               ; @.str.1
	.asciz	"Hello"

l_.str.2:                               ; @.str.2
	.asciz	"write(pair[0])"

l_.str.3:                               ; @.str.3
	.asciz	"write(pair[1])\n"

	.comm	_test_ok,4,2                    ; @test_ok
	.comm	_EVLOOP_ONCE,4,2                ; @EVLOOP_ONCE
	.comm	_readd_test_event_last_added,8,3 ; @readd_test_event_last_added
	.no_dead_strip	_test_nonpersist_readd
.subsections_via_symbols
