	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_update_timing
_test_update_timing:                    ## @test_update_timing
	.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	_test_begin
	xorl	%eax, %eax
	callq	_test_no_kevents
	movl	$500, %r12d                     ## imm = 0x1F4
	movq	_NOTE_USECONDS@GOTPCREL(%rip), %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$2, %edi
	callq	_mssleep
	xorl	%eax, %eax
	callq	_test_no_kevents_quietly
	incl	%r12d
	cmpl	$1500, %r12d                    ## imm = 0x5DC
	je	LBB0_8
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_vnode_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_EVFILT_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_EV_ONESHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_EV_ADD@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r15), %r15d
	movl	$1, %edi
	callq	_MS_TO_US
	movq	$0, (%rsp)
	leaq	-56(%rbp), %rdi
	movl	%r13d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movq	%rdi, %r14
	movl	%r15d, %r8d
	movq	%rax, %r9
	callq	_EV_SET
	movq	_kqfd@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	%r14, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_kevent
	testq	%rax, %rax
	jns	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	callq	_err
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r12d, %edi
	callq	_ussleep
	xorl	%eax, %eax
	callq	_now
	movq	%rax, %r13
	movl	(%rbx), %edi
	movq	%r14, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_kevent
	testq	%rax, %rax
	jns	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	callq	_err
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_EV_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -48(%rbp)
	movq	_NOTE_USECONDS@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	notl	%eax
	andl	%eax, -52(%rbp)
	movl	$1, -56(%rbp)
	movl	(%rbx), %edi
	callq	_kevent_get
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_kevent_cmp
	xorl	%eax, %eax
	callq	_now
	movq	%rax, %r14
	subq	%r13, %r14
	movl	$1, %edi
	callq	_MS_TO_US
	cmpq	%rax, %r14
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	callq	_errx
	jmp	LBB0_7
LBB0_8:
	xorl	%eax, %eax
	callq	_success
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kevent(EVFILT_TIMER (UPDATE TIMING), EV_ADD | EV_ONESHOT)"

	.comm	_vnode_fd,4,2                   ## @vnode_fd
	.comm	_EVFILT_TIMER,4,2               ## @EVFILT_TIMER
	.comm	_EV_ADD,4,2                     ## @EV_ADD
	.comm	_EV_ONESHOT,4,2                 ## @EV_ONESHOT
	.comm	_NOTE_USECONDS,4,2              ## @NOTE_USECONDS
	.comm	_kqfd,4,2                       ## @kqfd
L_.str.1:                               ## @.str.1
	.asciz	"%s"

	.comm	_EV_CLEAR,4,2                   ## @EV_CLEAR
L_.str.2:                               ## @.str.2
	.asciz	"early timer expiration: %ld us"

	.comm	_MAX_SLEEP,4,2                  ## @MAX_SLEEP
	.comm	_MIN_SLEEP,4,2                  ## @MIN_SLEEP
	.no_dead_strip	_test_update_timing
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_update_timing
_test_update_timing:                    ; @test_update_timing
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_test_begin
	bl	_test_no_kevents
	mov	w20, #500
Lloh2:
	adrp	x19, _EV_ADD@GOTPAGE
Lloh3:
	ldr	x19, [x19, _EV_ADD@GOTPAGEOFF]
Lloh4:
	adrp	x21, _EV_ONESHOT@GOTPAGE
Lloh5:
	ldr	x21, [x21, _EV_ONESHOT@GOTPAGEOFF]
Lloh6:
	adrp	x27, _NOTE_USECONDS@GOTPAGE
Lloh7:
	ldr	x27, [x27, _NOTE_USECONDS@GOTPAGEOFF]
Lloh8:
	adrp	x28, _kqfd@GOTPAGE
Lloh9:
	ldr	x28, [x28, _kqfd@GOTPAGEOFF]
Lloh10:
	adrp	x22, _EV_CLEAR@GOTPAGE
Lloh11:
	ldr	x22, [x22, _EV_CLEAR@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #2
	bl	_mssleep
	bl	_test_no_kevents_quietly
	add	w20, w20, #1
	cmp	w20, #1500
	b.eq	LBB0_8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
Lloh12:
	adrp	x8, _vnode_fd@GOTPAGE
Lloh13:
	ldr	x8, [x8, _vnode_fd@GOTPAGEOFF]
Lloh14:
	ldr	w23, [x8]
Lloh15:
	adrp	x8, _EVFILT_TIMER@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EVFILT_TIMER@GOTPAGEOFF]
Lloh17:
	ldr	w24, [x8]
	ldr	w8, [x19]
	ldr	w9, [x21]
	orr	w25, w9, w8
	ldr	w26, [x27]
	mov	w0, #1
	bl	_MS_TO_US
	mov	x5, x0
	mov	x0, sp
	mov	x1, x23
	mov	x2, x24
	mov	x3, x25
	mov	x4, x26
	mov	x6, #0
	bl	_EV_SET
	ldr	w0, [x28]
	mov	x1, sp
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_kevent
	tbz	x0, #63, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh20:
	adrp	x2, l_.str@PAGE
Lloh21:
	add	x2, x2, l_.str@PAGEOFF
	bl	_err
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_ussleep
	bl	_now
	mov	x23, x0
	ldr	w0, [x28]
	mov	x1, sp
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_kevent
	tbz	x0, #63, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh24:
	adrp	x2, l_.str@PAGE
Lloh25:
	add	x2, x2, l_.str@PAGEOFF
	bl	_err
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x22]
	ldp	w10, w9, [sp, #4]
	orr	w8, w9, w8
	str	w8, [sp, #8]
	ldr	w8, [x27]
	bic	w8, w10, w8
	str	w8, [sp, #4]
	mov	w8, #1
	str	w8, [sp]
	ldr	w0, [x28]
	bl	_kevent_get
	mov	x1, x0
	mov	x0, sp
	bl	_kevent_cmp
	bl	_now
	sub	x23, x0, x23
	mov	w0, #1
	bl	_MS_TO_US
	cmp	x23, x0
	b.ge	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	bl	_errx
	b	LBB0_1
LBB0_8:
	bl	_success
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kevent(EVFILT_TIMER (UPDATE TIMING), EV_ADD | EV_ONESHOT)"

	.comm	_vnode_fd,4,2                   ; @vnode_fd
	.comm	_EVFILT_TIMER,4,2               ; @EVFILT_TIMER
	.comm	_EV_ADD,4,2                     ; @EV_ADD
	.comm	_EV_ONESHOT,4,2                 ; @EV_ONESHOT
	.comm	_NOTE_USECONDS,4,2              ; @NOTE_USECONDS
	.comm	_kqfd,4,2                       ; @kqfd
l_.str.1:                               ; @.str.1
	.asciz	"%s"

	.comm	_EV_CLEAR,4,2                   ; @EV_CLEAR
l_.str.2:                               ; @.str.2
	.asciz	"early timer expiration: %ld us"

	.comm	_MAX_SLEEP,4,2                  ; @MAX_SLEEP
	.comm	_MIN_SLEEP,4,2                  ; @MIN_SLEEP
	.no_dead_strip	_test_update_timing
.subsections_via_symbols
