	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_epoll_wait                 ## -- Begin function sys_epoll_wait
	.p2align	4, 0x90
_sys_epoll_wait:                        ## @sys_epoll_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	callq	_STRACE
	movl	%ebx, %edi
	callq	_f_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	8(%rax), %rax
	cmpq	_epoll_ops@GOTPCREL(%rip), %rax
	je	LBB0_4
LBB0_3:
	movq	__EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_11
LBB0_1:
	movq	__EBADF@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_11
LBB0_4:
	cmpl	$-1, %r12d
	je	LBB0_6
## %bb.5:
	movslq	%r12d, %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movl	%eax, -56(%rbp)
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	movl	%r12d, %ecx
	subl	%eax, %ecx
	imull	$1000000, %ecx, %eax            ## imm = 0xF4240
	movl	%eax, -52(%rbp)
LBB0_6:
	testl	%r15d, %r15d
	jle	LBB0_3
## %bb.7:
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movl	%r15d, %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	xorl	%eax, %eax
	cmpl	$-1, %r12d
	movl	%r15d, -80(%rbp)
	movl	$0, -76(%rbp)
	movq	%r13, -72(%rbp)
	movl	(%rbx), %edi
	movq	_epoll_callback@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-56(%rbp), %rcx
	cmoveq	%rax, %rcx
	leaq	-80(%rbp), %rdx
	callq	_poll_wait
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.8:
	movl	%ebx, %edx
	shll	$2, %edx
	movl	%r14d, %edi
	movq	%r13, %rsi
	callq	_user_write
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	__EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_10:
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"epoll_wait(%d, %#x, %d, %d)"

	.comm	__EBADF,4,2                     ## @_EBADF
	.comm	_epoll_ops,4,2                  ## @epoll_ops
	.comm	__EINVAL,4,2                    ## @_EINVAL
	.comm	_epoll_callback,4,2             ## @epoll_callback
	.comm	__EFAULT,4,2                    ## @_EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_epoll_wait                 ; -- Begin function sys_epoll_wait
	.p2align	2
_sys_epoll_wait:                        ; @sys_epoll_wait
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #32
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x19
	mov	x3, x21
	mov	x4, x20
	bl	_STRACE
	mov	x0, x22
	bl	_f_get
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x0, #8]
Lloh5:
	adrp	x9, _epoll_ops@GOTPAGE
Lloh6:
	ldr	x9, [x9, _epoll_ops@GOTPAGEOFF]
	cmp	x8, x9
	b.eq	LBB0_4
LBB0_2:
Lloh7:
	adrp	x8, __EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, __EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w20, [x8]
	b	LBB0_10
LBB0_3:
Lloh10:
	adrp	x8, __EBADF@GOTPAGE
Lloh11:
	ldr	x8, [x8, __EBADF@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
	b	LBB0_10
LBB0_4:
	cmn	w20, #1
	b.eq	LBB0_6
; %bb.5:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w20, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	mov	w9, #1000
	msub	w9, w8, w9, w20
	mov	w10, #16960
	movk	w10, #15, lsl #16
	mul	w9, w9, w10
	stp	w8, w9, [x29, #-64]
LBB0_6:
	cmp	w21, #0
	b.le	LBB0_2
; %bb.7:
	mov	x23, sp
	mov	w8, w21
	lsl	x8, x8, #2
	mov	x9, x8
Lloh13:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh14:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	stp	w21, wzr, [x29, #-80]
	stur	x22, [x29, #-72]
	ldr	w0, [x0]
Lloh15:
	adrp	x8, _epoll_callback@GOTPAGE
Lloh16:
	ldr	x8, [x8, _epoll_callback@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	cmn	w20, #1
	sub	x8, x29, #64
	csel	x3, xzr, x8, eq
	sub	x2, x29, #80
	bl	_poll_wait
	mov	x20, x0
	tbnz	w0, #31, LBB0_9
; %bb.8:
	lsl	w2, w20, #2
	mov	x0, x19
	mov	x1, x22
	bl	_user_write
Lloh18:
	adrp	x8, __EFAULT@GOTPAGE
Lloh19:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w20, w20, w8, eq
LBB0_9:
	mov	sp, x23
LBB0_10:
	ldur	x8, [x29, #-56]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x20
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"epoll_wait(%d, %#x, %d, %d)"

	.comm	__EBADF,4,2                     ; @_EBADF
	.comm	_epoll_ops,4,2                  ; @epoll_ops
	.comm	__EINVAL,4,2                    ; @_EINVAL
	.comm	_epoll_callback,4,2             ; @epoll_callback
	.comm	__EFAULT,4,2                    ; @_EFAULT
.subsections_via_symbols
