	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_poll                           ## -- Begin function poll
	.p2align	4, 0x90
_poll:                                  ## @poll
	.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	%esi, %r14d
	movq	%rdi, %rbx
	testq	%rdi, %rdi
	jne	LBB0_4
## %bb.1:
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.2:
	movq	_EFAULT@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %r14d
	jmp	LBB0_33
LBB0_4:
	testl	%edx, %edx
	je	LBB0_5
## %bb.6:
	jle	LBB0_9
## %bb.7:
	movl	%edx, %eax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	movl	%eax, -64(%rbp)
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	subl	%eax, %edx
	imull	$1000, %edx, %eax               ## imm = 0x3E8
	jmp	LBB0_8
LBB0_5:
	movl	$0, -64(%rbp)
	xorl	%eax, %eax
LBB0_8:
	movl	%eax, -60(%rbp)
	leaq	-64(%rbp), %r15
LBB0_12:
	leaq	-52(%rbp), %rdi
	callq	_FD_ZERO
	leaq	-48(%rbp), %rdi
	callq	_FD_ZERO
	leaq	-44(%rbp), %rdi
	callq	_FD_ZERO
	testl	%r14d, %r14d
	jle	LBB0_34
## %bb.13:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	%r14d, %eax
	shlq	$2, %rax
	leaq	(%rax,%rax,2), %r12
	movl	$-1, %r15d
	xorl	%r13d, %r13d
	movq	_POLLRDBAND@GOTPCREL(%rip), %r14
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_14 Depth=1
	addq	$12, %r13
	cmpq	%r13, %r12
	je	LBB0_26
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r13), %edi
	testl	%edi, %edi
	js	LBB0_25
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	4(%rbx,%r13), %eax
	movq	_POLLRDNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_POLLIN@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	leaq	-52(%rbp), %rsi
	callq	_FD_SET
	movl	4(%rbx,%r13), %eax
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	_POLLWRNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_POLLOUT@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_POLLWRBAND@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	(%rbx,%r13), %edi
	leaq	-48(%rbp), %rsi
	callq	_FD_SET
	movl	4(%rbx,%r13), %eax
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	(%r14), %ecx
	movq	_POLLPRI@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	(%rbx,%r13), %edi
	leaq	-44(%rbp), %rsi
	callq	_FD_SET
LBB0_21:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	(%rbx,%r13), %eax
	cmpl	%r15d, %eax
	jl	LBB0_25
## %bb.22:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_POLLOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_POLLIN@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_POLLPRI@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_POLLRDNORM@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	orl	(%r14), %ecx
	movq	_POLLWRNORM@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_POLLWRBAND@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%ecx, 4(%rbx,%r13)
	je	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%eax, %r15d
	movq	_FD_SETSIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_25
## %bb.24:
	movq	_EOVERFLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_26:
	incl	%r15d
	leaq	-52(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movl	%r15d, %edi
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	callq	_select
	movl	%eax, %r14d
	xorl	%r15d, %r15d
	testl	%eax, %eax
	cmovnsl	%r15d, %r14d
	js	LBB0_33
## %bb.27:
	leaq	-44(%rbp), %r13
	xorl	%r14d, %r14d
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_28 Depth=1
	movl	$0, 8(%rbx,%r15)
LBB0_32:                                ##   in Loop: Header=BB0_28 Depth=1
	addq	$12, %r15
	cmpq	%r15, %r12
	je	LBB0_33
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r15), %edi
	testl	%edi, %edi
	js	LBB0_31
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	movl	4(%rbx,%r15), %esi
	leaq	-52(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	movq	%r13, %r8
	callq	_compute_revents
	testl	%eax, %eax
	je	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_28 Depth=1
	movl	%eax, 8(%rbx,%r15)
	incl	%r14d
	jmp	LBB0_32
LBB0_34:
	leaq	-52(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	xorl	%edi, %edi
	movq	%r15, %r8
	callq	_select
	movl	%eax, %r14d
	sarl	$31, %r14d
	andl	%eax, %r14d
LBB0_33:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_INFTIM@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_10
## %bb.11:
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_errno,4,2                      ## @errno
	.comm	_INFTIM,4,2                     ## @INFTIM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLRDNORM,4,2                 ## @POLLRDNORM
	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_POLLWRNORM,4,2                 ## @POLLWRNORM
	.comm	_POLLWRBAND,4,2                 ## @POLLWRBAND
	.comm	_POLLPRI,4,2                    ## @POLLPRI
	.comm	_POLLRDBAND,4,2                 ## @POLLRDBAND
	.comm	_FD_SETSIZE,4,2                 ## @FD_SETSIZE
	.comm	_EOVERFLOW,4,2                  ## @EOVERFLOW
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_FD_ACCEPT,4,2                  ## @FD_ACCEPT
	.comm	_FD_CLOSE,4,2                   ## @FD_CLOSE
	.comm	_FD_CONNECT,4,2                 ## @FD_CONNECT
	.comm	_FD_OOB,4,2                     ## @FD_OOB
	.comm	_FD_READ,4,2                    ## @FD_READ
	.comm	_FD_WRITE,4,2                   ## @FD_WRITE
	.comm	_INFINITE,8,3                   ## @INFINITE
	.comm	_OPEN_MAX,4,2                   ## @OPEN_MAX
	.comm	_PM_REMOVE,4,2                  ## @PM_REMOVE
	.comm	_QS_ALLINPUT,4,2                ## @QS_ALLINPUT
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_WAIT_OBJECT_0,8,3              ## @WAIT_OBJECT_0
	.comm	__SC_OPEN_MAX,4,2               ## @_SC_OPEN_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_poll                           ; -- Begin function poll
	.p2align	2
_poll:                                  ; @poll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x21, x1
	mov	x19, x0
	cbnz	x0, LBB0_4
; %bb.1:
	cbz	w21, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _EFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
Lloh2:
	adrp	x9, _errno@GOTPAGE
Lloh3:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh4:
	str	w8, [x9]
	mov	w20, #-1
	b	LBB0_31
LBB0_4:
	cbz	w2, LBB0_7
; %bb.5:
	cmp	w2, #1
	b.lt	LBB0_32
; %bb.6:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w2, w8
	lsr	x8, x8, #38
	str	w8, [sp, #24]
	mov	w9, #1000
	msub	w8, w8, w9, w2
	mul	w8, w8, w9
	b	LBB0_8
LBB0_7:
	mov	w8, #0
	str	wzr, [sp, #24]
LBB0_8:
	str	w8, [sp, #28]
	add	x20, sp, #24
LBB0_9:
	add	x0, sp, #44
	bl	_FD_ZERO
	add	x0, sp, #40
	bl	_FD_ZERO
	add	x0, sp, #36
	bl	_FD_ZERO
	cmp	w21, #1
	b.lt	LBB0_30
; %bb.10:
	str	x20, [sp, #16]                  ; 8-byte Folded Spill
Lloh5:
	adrp	x24, _POLLRDNORM@GOTPAGE
Lloh6:
	ldr	x24, [x24, _POLLRDNORM@GOTPAGEOFF]
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	add	x25, x19, #4
Lloh7:
	adrp	x26, _POLLOUT@GOTPAGE
Lloh8:
	ldr	x26, [x26, _POLLOUT@GOTPAGEOFF]
	mov	w23, w21
Lloh9:
	adrp	x27, _POLLWRNORM@GOTPAGE
Lloh10:
	ldr	x27, [x27, _POLLWRNORM@GOTPAGEOFF]
Lloh11:
	adrp	x28, _POLLWRBAND@GOTPAGE
Lloh12:
	ldr	x28, [x28, _POLLWRBAND@GOTPAGEOFF]
Lloh13:
	adrp	x20, _POLLPRI@GOTPAGE
Lloh14:
	ldr	x20, [x20, _POLLPRI@GOTPAGEOFF]
Lloh15:
	adrp	x22, _POLLRDBAND@GOTPAGE
Lloh16:
	ldr	x22, [x22, _POLLRDBAND@GOTPAGEOFF]
	mov	w19, #-1
	mov	x21, x23
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x25, x25, #12
	subs	x21, x21, #1
	b.eq	LBB0_23
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldur	w0, [x25, #-4]
	tbnz	w0, #31, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x25]
Lloh17:
	adrp	x9, _POLLIN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _POLLIN@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	ldr	w10, [x24]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x1, sp, #44
	bl	_FD_SET
	ldr	w8, [x25]
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w9, [x26]
	ldr	w10, [x27]
	orr	w9, w10, w9
	ldr	w10, [x28]
	orr	w9, w9, w10
	tst	w9, w8
	b.eq	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	ldur	w0, [x25, #-4]
	add	x1, sp, #40
	bl	_FD_SET
	ldr	w8, [x25]
LBB0_17:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w9, [x20]
	ldr	w10, [x22]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_12 Depth=1
	ldur	w0, [x25, #-4]
	add	x1, sp, #36
	bl	_FD_SET
LBB0_19:                                ;   in Loop: Header=BB0_12 Depth=1
	ldur	w8, [x25, #-4]
	cmp	w8, w19
	b.lt	LBB0_11
; %bb.20:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w9, [x25]
Lloh20:
	adrp	x10, _POLLIN@GOTPAGE
Lloh21:
	ldr	x10, [x10, _POLLIN@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	ldr	w11, [x26]
	orr	w10, w11, w10
	ldr	w11, [x20]
	orr	w10, w10, w11
	ldr	w11, [x24]
	orr	w10, w10, w11
	ldr	w11, [x22]
	orr	w10, w10, w11
	ldr	w11, [x27]
	orr	w10, w10, w11
	ldr	w11, [x28]
	orr	w10, w10, w11
	tst	w10, w9
	b.eq	LBB0_11
; %bb.21:                               ;   in Loop: Header=BB0_12 Depth=1
Lloh23:
	adrp	x9, _FD_SETSIZE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _FD_SETSIZE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	mov	x19, x8
	cmp	w8, w9
	b.le	LBB0_11
; %bb.22:
Lloh26:
	adrp	x8, _EOVERFLOW@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EOVERFLOW@GOTPAGEOFF]
	b	LBB0_3
LBB0_23:
	add	w0, w19, #1
	add	x1, sp, #44
	add	x2, sp, #40
	add	x3, sp, #36
	ldr	x4, [sp, #16]                   ; 8-byte Folded Reload
	bl	_select
	cmp	w0, #0
	csel	w20, w0, wzr, lt
	tbnz	w0, #31, LBB0_31
; %bb.24:
	mov	w20, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x19, x8, #8
	b	LBB0_27
LBB0_25:                                ;   in Loop: Header=BB0_27 Depth=1
	str	wzr, [x19]
LBB0_26:                                ;   in Loop: Header=BB0_27 Depth=1
	add	x19, x19, #12
	subs	x23, x23, #1
	b.eq	LBB0_31
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldur	w0, [x19, #-8]
	tbnz	w0, #31, LBB0_25
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	ldur	w1, [x19, #-4]
	add	x2, sp, #44
	add	x3, sp, #40
	add	x4, sp, #36
	bl	_compute_revents
	cbz	w0, LBB0_25
; %bb.29:                               ;   in Loop: Header=BB0_27 Depth=1
	str	w0, [x19]
	add	w20, w20, #1
	b	LBB0_26
LBB0_30:
	add	x1, sp, #44
	add	x2, sp, #40
	add	x3, sp, #36
	mov	w0, #0
	mov	x4, x20
	bl	_select
	cmp	w0, #0
	csel	w20, w0, wzr, lt
LBB0_31:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_32:
Lloh28:
	adrp	x8, _INFTIM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _INFTIM@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_34
; %bb.33:
	mov	x20, #0
	b	LBB0_9
LBB0_34:
Lloh31:
	adrp	x8, _EINVAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_errno,4,2                      ; @errno
	.comm	_INFTIM,4,2                     ; @INFTIM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLRDNORM,4,2                 ; @POLLRDNORM
	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_POLLWRNORM,4,2                 ; @POLLWRNORM
	.comm	_POLLWRBAND,4,2                 ; @POLLWRBAND
	.comm	_POLLPRI,4,2                    ; @POLLPRI
	.comm	_POLLRDBAND,4,2                 ; @POLLRDBAND
	.comm	_FD_SETSIZE,4,2                 ; @FD_SETSIZE
	.comm	_EOVERFLOW,4,2                  ; @EOVERFLOW
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_FD_ACCEPT,4,2                  ; @FD_ACCEPT
	.comm	_FD_CLOSE,4,2                   ; @FD_CLOSE
	.comm	_FD_CONNECT,4,2                 ; @FD_CONNECT
	.comm	_FD_OOB,4,2                     ; @FD_OOB
	.comm	_FD_READ,4,2                    ; @FD_READ
	.comm	_FD_WRITE,4,2                   ; @FD_WRITE
	.comm	_INFINITE,8,3                   ; @INFINITE
	.comm	_OPEN_MAX,4,2                   ; @OPEN_MAX
	.comm	_PM_REMOVE,4,2                  ; @PM_REMOVE
	.comm	_QS_ALLINPUT,4,2                ; @QS_ALLINPUT
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_WAIT_OBJECT_0,8,3              ; @WAIT_OBJECT_0
	.comm	__SC_OPEN_MAX,4,2               ; @_SC_OPEN_MAX
.subsections_via_symbols
