	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_wait
_do_wait:                               ## @do_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	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movl	%edi, %r14d
	cmpl	$-1, %esi
	je	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	testl	%ebx, %ebx
	setg	%dil
	callq	_assert
	movl	%ebx, -40(%rbp)
	movq	$0, -32(%rbp)
	movslq	%ebx, %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_log_debugx
	leaq	-24(%rbp), %rcx
	leaq	-40(%rbp), %r9
	movl	%r14d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$1, %r8d
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_log_debugx
	leaq	-24(%rbp), %rcx
	movl	%r14d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
LBB0_3:
	callq	_kevent
	testl	%eax, %eax
	js	LBB0_4
## %bb.7:
	jne	LBB0_6
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_log_debugx
	xorl	%edi, %edi
	testl	%ebx, %ebx
	setg	%dil
	callq	_assert
	jmp	LBB0_9
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_log_err
LBB0_6:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_log_debugx
LBB0_9:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"waiting for filesystem event for %ld seconds"

L_.str.1:                               ## @.str.1
	.asciz	"waiting for filesystem event"

	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
L_.str.2:                               ## @.str.2
	.asciz	"kevent"

L_.str.3:                               ## @.str.3
	.asciz	"timeout reached"

L_.str.4:                               ## @.str.4
	.asciz	"got filesystem event"

	.no_dead_strip	_do_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_wait
_do_wait:                               ; @do_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x1
	mov	x20, x0
	cmn	w1, #1
	b.eq	LBB0_4
; %bb.1:
	cmp	w19, #0
	cset	w0, gt
	bl	_assert
	str	w19, [sp, #16]
	str	xzr, [sp, #24]
	sxtw	x8, w19
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_log_debugx
	add	x3, sp, #8
	add	x5, sp, #16
	mov	x0, x20
	mov	x1, #0
	mov	w2, #0
	mov	w4, #1
	bl	_kevent
	tbnz	w0, #31, LBB0_5
LBB0_2:
	cbnz	w0, LBB0_7
; %bb.3:
Lloh2:
	adrp	x0, l_.str.3@PAGE
Lloh3:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_log_debugx
	cmp	w19, #0
	cset	w0, gt
	bl	_assert
	b	LBB0_8
LBB0_4:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_log_debugx
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, #0
	mov	w2, #0
	mov	w4, #1
	mov	x5, #0
	bl	_kevent
	tbz	w0, #31, LBB0_2
LBB0_5:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _EINTR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EINTR@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.6:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_log_err
LBB0_7:
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_log_debugx
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"waiting for filesystem event for %ld seconds"

l_.str.1:                               ; @.str.1
	.asciz	"waiting for filesystem event"

	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
l_.str.2:                               ; @.str.2
	.asciz	"kevent"

l_.str.3:                               ; @.str.3
	.asciz	"timeout reached"

l_.str.4:                               ; @.str.4
	.asciz	"got filesystem event"

	.no_dead_strip	_do_wait
.subsections_via_symbols
