	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_kevent_socket_oneshot     ## -- Begin function test_kevent_socket_oneshot
	.p2align	4, 0x90
_test_kevent_socket_oneshot:            ## @test_kevent_socket_oneshot
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	L_.str(%rip), %rdi
	callq	_test_begin
	leaq	L_.str.1(%rip), %rdi
	callq	_puts
	movq	_sockfd@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	(%rax), %esi
	movq	_EVFILT_READ@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_EV_ADD@GOTPCREL(%rip), %rdi
	movq	_EV_ONESHOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdi), %ecx
	movq	%rax, (%rsp)
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_EV_SET
	movq	_kqfd@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	%rbx, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_kevent
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str.2(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	callq	_err
LBB0_2:
	xorl	%eax, %eax
	callq	_test_no_kevents
	leaq	L_.str.3(%rip), %rdi
	callq	_puts
	xorl	%eax, %eax
	callq	_kevent_socket_fill
	movl	$1, -40(%rbp)
	movl	(%r12), %edi
	callq	_kevent_get
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_kevent_cmp
	leaq	L_.str.4(%rip), %rdi
	callq	_puts
	xorl	%eax, %eax
	callq	_test_no_kevents
	movq	(%r14), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	_EV_DELETE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_EV_SET
	movl	(%r12), %edi
	movq	%rbx, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_kevent
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	callq	_err
LBB0_4:
	xorl	%eax, %eax
	callq	_kevent_socket_drain
	xorl	%eax, %eax
	callq	_success
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kevent(EVFILT_READ, EV_ONESHOT)"

L_.str.1:                               ## @.str.1
	.asciz	"-- re-adding knote"

	.comm	_sockfd,8,3                     ## @sockfd
	.comm	_EVFILT_READ,4,2                ## @EVFILT_READ
	.comm	_EV_ADD,4,2                     ## @EV_ADD
	.comm	_EV_ONESHOT,4,2                 ## @EV_ONESHOT
	.comm	_kqfd,4,2                       ## @kqfd
L_.str.2:                               ## @.str.2
	.asciz	"%s"

L_.str.3:                               ## @.str.3
	.asciz	"-- getting one event"

L_.str.4:                               ## @.str.4
	.asciz	"-- checking knote disabled"

	.comm	_EV_DELETE,4,2                  ## @EV_DELETE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_kevent_socket_oneshot     ; -- Begin function test_kevent_socket_oneshot
	.p2align	2
_test_kevent_socket_oneshot:            ; @test_kevent_socket_oneshot
	.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	_test_begin
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_puts
Lloh4:
	adrp	x19, _sockfd@GOTPAGE
Lloh5:
	ldr	x19, [x19, _sockfd@GOTPAGEOFF]
	ldr	x6, [x19]
	ldr	w1, [x6]
Lloh6:
	adrp	x20, _EVFILT_READ@GOTPAGE
Lloh7:
	ldr	x20, [x20, _EVFILT_READ@GOTPAGEOFF]
Lloh8:
	adrp	x8, _EV_ADD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EV_ADD@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _EV_ONESHOT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EV_ONESHOT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w3, w9, w8
	add	x0, sp, #8
	mov	w4, #0
	mov	w5, #0
	bl	_EV_SET
Lloh14:
	adrp	x21, _kqfd@GOTPAGE
Lloh15:
	ldr	x21, [x21, _kqfd@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w22, #1
	add	x1, sp, #8
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_kevent
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	bl	_test_no_kevents
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_puts
	bl	_kevent_socket_fill
	str	w22, [sp, #8]
	ldr	w0, [x21]
	bl	_kevent_get
	mov	x1, x0
	add	x0, sp, #8
	bl	_kevent_cmp
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_puts
	bl	_test_no_kevents
	ldr	x6, [x19]
	ldr	w1, [x6]
	ldr	w2, [x20]
Lloh24:
	adrp	x8, _EV_DELETE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EV_DELETE@GOTPAGEOFF]
Lloh26:
	ldr	w3, [x8]
	add	x0, sp, #8
	mov	w4, #0
	mov	w5, #0
	bl	_EV_SET
	ldr	w0, [x21]
	add	x1, sp, #8
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_kevent
	cbnz	x0, LBB0_4
; %bb.3:
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
Lloh29:
	adrp	x2, l_.str@PAGE
Lloh30:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	bl	_kevent_socket_drain
	bl	_success
	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
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kevent(EVFILT_READ, EV_ONESHOT)"

l_.str.1:                               ; @.str.1
	.asciz	"-- re-adding knote"

	.comm	_sockfd,8,3                     ; @sockfd
	.comm	_EVFILT_READ,4,2                ; @EVFILT_READ
	.comm	_EV_ADD,4,2                     ; @EV_ADD
	.comm	_EV_ONESHOT,4,2                 ; @EV_ONESHOT
	.comm	_kqfd,4,2                       ; @kqfd
l_.str.2:                               ; @.str.2
	.asciz	"%s"

l_.str.3:                               ; @.str.3
	.asciz	"-- getting one event"

l_.str.4:                               ; @.str.4
	.asciz	"-- checking knote disabled"

	.comm	_EV_DELETE,4,2                  ; @EV_DELETE
.subsections_via_symbols
