	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_kevent_signal_oneshot     ## -- Begin function test_kevent_signal_oneshot
	.p2align	4, 0x90
_test_kevent_signal_oneshot:            ## @test_kevent_signal_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	L_.str(%rip), %rdi
	callq	_test_begin
	movq	_SIGUSR1@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_EVFILT_SIGNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_EV_ADD@GOTPCREL(%rip), %rax
	movq	_EV_ONESHOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	$0, (%rsp)
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_EV_SET
	movq	_kqfd@GOTPCREL(%rip), %r15
	movl	(%r15), %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.1(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	leaq	-36(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_sigemptyset
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_sigaddset
	movq	_SIG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_sigprocmask
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_4:
	xorl	%eax, %eax
	callq	_getpid
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_kill
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_6:
	movq	_EV_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -28(%rbp)
	movl	$1, -32(%rbp)
	movl	(%r15), %edi
	callq	_kevent_get
	leaq	-32(%rbp), %rdi
	movl	%eax, %esi
	callq	_kevent_cmp
	xorl	%eax, %eax
	callq	_getpid
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_kill
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_8:
	xorl	%eax, %eax
	callq	_test_no_kevents
	xorl	%eax, %eax
	callq	_success
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kevent(EVFILT_SIGNAL, EV_ONESHOT)"

	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
	.comm	_EVFILT_SIGNAL,4,2              ## @EVFILT_SIGNAL
	.comm	_EV_ADD,4,2                     ## @EV_ADD
	.comm	_EV_ONESHOT,4,2                 ## @EV_ONESHOT
	.comm	_kqfd,4,2                       ## @kqfd
L_.str.1:                               ## @.str.1
	.asciz	"%s"

	.comm	_SIG_BLOCK,4,2                  ## @SIG_BLOCK
L_.str.2:                               ## @.str.2
	.asciz	"sigprocmask"

L_.str.3:                               ## @.str.3
	.asciz	"kill"

	.comm	_EV_CLEAR,4,2                   ## @EV_CLEAR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_kevent_signal_oneshot     ; -- Begin function test_kevent_signal_oneshot
	.p2align	2
_test_kevent_signal_oneshot:            ; @test_kevent_signal_oneshot
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, l_.str@PAGE
Lloh1:
	add	x19, x19, l_.str@PAGEOFF
	mov	x0, x19
	bl	_test_begin
Lloh2:
	adrp	x20, _SIGUSR1@GOTPAGE
Lloh3:
	ldr	x20, [x20, _SIGUSR1@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh4:
	adrp	x8, _EVFILT_SIGNAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EVFILT_SIGNAL@GOTPAGEOFF]
Lloh6:
	adrp	x9, _EV_ADD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EV_ADD@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	ldr	w8, [x9]
Lloh10:
	adrp	x9, _EV_ONESHOT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EV_ONESHOT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w3, w9, w8
	add	x0, sp, #24
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	bl	_EV_SET
Lloh13:
	adrp	x21, _kqfd@GOTPAGE
Lloh14:
	ldr	x21, [x21, _kqfd@GOTPAGEOFF]
	ldr	w0, [x21]
	add	x1, sp, #24
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_kevent
	tbz	x0, #63, LBB0_2
; %bb.1:
	str	x19, [sp]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	add	x0, sp, #20
	bl	_sigemptyset
	ldr	w1, [x20]
	add	x0, sp, #20
	bl	_sigaddset
Lloh17:
	adrp	x8, _SIG_BLOCK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SIG_BLOCK@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	add	x1, sp, #20
	mov	x2, #0
	bl	_sigprocmask
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	bl	_getpid
	ldr	w1, [x20]
	bl	_kill
	tbz	x0, #63, LBB0_6
; %bb.5:
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
Lloh24:
	adrp	x8, _EV_CLEAR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EV_CLEAR@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	w9, [sp, #28]
	orr	w8, w9, w8
	mov	w9, #1
	stp	w9, w8, [sp, #24]
	ldr	w0, [x21]
	bl	_kevent_get
	mov	x1, x0
	add	x0, sp, #24
	bl	_kevent_cmp
	bl	_getpid
	ldr	w1, [x20]
	bl	_kill
	tbz	x0, #63, LBB0_8
; %bb.7:
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_8:
	bl	_test_no_kevents
	bl	_success
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kevent(EVFILT_SIGNAL, EV_ONESHOT)"

	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
	.comm	_EVFILT_SIGNAL,4,2              ; @EVFILT_SIGNAL
	.comm	_EV_ADD,4,2                     ; @EV_ADD
	.comm	_EV_ONESHOT,4,2                 ; @EV_ONESHOT
	.comm	_kqfd,4,2                       ; @kqfd
l_.str.1:                               ; @.str.1
	.asciz	"%s"

	.comm	_SIG_BLOCK,4,2                  ; @SIG_BLOCK
l_.str.2:                               ; @.str.2
	.asciz	"sigprocmask"

l_.str.3:                               ; @.str.3
	.asciz	"kill"

	.comm	_EV_CLEAR,4,2                   ; @EV_CLEAR
.subsections_via_symbols
