	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r13
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	xorl	%r15d, %r15d
	movq	%rbx, %r12
	movq	_FD_SETSIZE@GOTPCREL(%rip), %r14
	movq	%r13, %rbx
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %esi
	cmpl	(%r14), %esi
	jge	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, %edi
	callq	_MAX
	movl	%eax, %r15d
	addq	$12, %rbx
	decq	%r12
	jne	LBB0_3
## %bb.6:
	incl	%r15d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_1:
	movl	$1, %r15d
LBB0_7:
	movq	_NFDBITS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_howmany
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	$4, %esi
	callq	_calloc
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_calloc
	movq	%rax, %rcx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_8
## %bb.11:
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_calloc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_9
## %bb.12:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	je	LBB0_20
## %bb.13:
	leaq	4(%r13), %rbx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=1
	addq	$12, %rbx
	decq	%r14
	je	LBB0_20
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	-4(%rbx), %r12d
	cmpl	$-1, %r12d
	je	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	(%rbx), %eax
	movq	_POLLIN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%r12d, %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_FD_SET
	movl	%r12d, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_FD_SET
	movl	(%rbx), %eax
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	_POLLOUT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%r12d, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_FD_SET
	movl	%r12d, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_FD_SET
	jmp	LBB0_19
LBB0_8:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	$-1, %r15d
	xorl	%ebx, %ebx
LBB0_34:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	%rbx, %rdi
	callq	_free
	cmpl	$-1, %r15d
	jne	LBB0_36
	jmp	LBB0_35
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_35:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%r12d, (%rax)
	movl	$-1, %r15d
LBB0_36:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	js	LBB0_21
## %bb.22:
	movl	%ecx, %eax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	movl	%eax, -88(%rbp)
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	subl	%eax, %ecx
	imull	$1000, %ecx, %eax               ## imm = 0x3E8
	movl	%eax, -84(%rbp)
	leaq	-88(%rbp), %r8
	jmp	LBB0_23
LBB0_21:
	xorl	%r8d, %r8d
LBB0_23:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%r15d, %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_select
	movl	%eax, %r15d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	testq	%r14, %r14
	je	LBB0_34
## %bb.24:
	addq	$8, %r13
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_25 Depth=1
	addq	$12, %r13
	decq	%r14
	je	LBB0_33
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movl	-8(%r13), %ebx
	movl	$0, (%r13)
	cmpl	$-1, %ebx
	je	LBB0_32
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	movl	%ebx, %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_FD_ISSET
	testq	%rax, %rax
	je	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
LBB0_28:                                ##   in Loop: Header=BB0_25 Depth=1
	movl	%ebx, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_FD_ISSET
	testq	%rax, %rax
	je	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	_POLLOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
LBB0_30:                                ##   in Loop: Header=BB0_25 Depth=1
	movl	%ebx, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_FD_ISSET
	testq	%rax, %rax
	je	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	_POLLERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
	jmp	LBB0_32
LBB0_33:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_34
	.cfi_endproc
                                        ## -- End function
	.comm	_FD_SETSIZE,4,2                 ## @FD_SETSIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_NFDBITS,4,2                    ## @NFDBITS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_POLLERR,4,2                    ## @POLLERR
.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, #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
	mov	x24, x2
	mov	x27, x1
	mov	x23, x0
	cbz	x1, LBB0_5
; %bb.1:
	mov	w0, #0
Lloh0:
	adrp	x19, _FD_SETSIZE@GOTPAGE
Lloh1:
	ldr	x19, [x19, _FD_SETSIZE@GOTPAGEOFF]
	mov	x20, x23
	mov	x21, x27
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	ldr	w8, [x19]
	cmp	w1, w8
	b.ge	LBB0_17
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_MAX
	add	x20, x20, #12
	subs	x21, x21, #1
	b.ne	LBB0_2
; %bb.4:
	add	w25, w0, #1
	b	LBB0_6
LBB0_5:
	mov	w25, #1
LBB0_6:
Lloh2:
	adrp	x8, _NFDBITS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NFDBITS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x25
	bl	_howmany
	mov	x22, x0
	mov	w1, #4
	bl	_calloc
	mov	x20, x0
	cbz	x0, LBB0_18
; %bb.7:
	mov	x0, x22
	mov	w1, #4
	bl	_calloc
	mov	x21, x0
	cbz	x0, LBB0_19
; %bb.8:
	mov	x0, x22
	mov	w1, #4
	bl	_calloc
	cbz	x0, LBB0_19
; %bb.9:
	mov	x22, x0
	str	w24, [sp, #4]                   ; 4-byte Folded Spill
Lloh5:
	adrp	x28, _POLLIN@GOTPAGE
Lloh6:
	ldr	x28, [x28, _POLLIN@GOTPAGEOFF]
	cbz	x27, LBB0_23
; %bb.10:
	add	x24, x23, #4
	mov	x19, x27
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x24, x24, #12
	subs	x19, x19, #1
	b.eq	LBB0_23
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldur	w26, [x24, #-4]
	cmn	w26, #1
	b.eq	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x26
	mov	x1, x20
	bl	_FD_SET
	mov	x0, x26
	mov	x1, x22
	bl	_FD_SET
	ldr	w8, [x24]
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
Lloh7:
	adrp	x9, _POLLOUT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _POLLOUT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x26
	mov	x1, x21
	bl	_FD_SET
	mov	x0, x26
	mov	x1, x22
	bl	_FD_SET
	b	LBB0_11
LBB0_17:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w25, [x8]
	b	LBB0_21
LBB0_18:
	mov	x21, #0
LBB0_19:
	mov	x22, #0
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w25, [x8]
	mov	w24, #-1
LBB0_20:
	mov	x0, x20
	bl	_free
	mov	x0, x21
	bl	_free
	mov	x0, x22
	bl	_free
	cmn	w24, #1
	b.ne	LBB0_22
LBB0_21:
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	str	w25, [x8]
	mov	w24, #-1
LBB0_22:
	mov	x0, x24
	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
LBB0_23:
	ldr	w10, [sp, #4]                   ; 4-byte Folded Reload
	tbnz	w10, #31, LBB0_25
; %bb.24:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w10, w8
	lsr	x8, x8, #38
	mov	w9, #1000
	msub	w10, w8, w9, w10
	mul	w9, w10, w9
	stp	w8, w9, [sp, #8]
	add	x4, sp, #8
	b	LBB0_26
LBB0_25:
	mov	x4, #0
LBB0_26:
	mov	x0, x25
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_select
	mov	x24, x0
Lloh19:
	adrp	x8, _errno@GOTPAGE
Lloh20:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh21:
	ldr	w25, [x8]
	cbz	x27, LBB0_20
; %bb.27:
	add	x26, x23, #8
Lloh22:
	adrp	x19, _POLLERR@GOTPAGE
Lloh23:
	ldr	x19, [x19, _POLLERR@GOTPAGEOFF]
	b	LBB0_29
LBB0_28:                                ;   in Loop: Header=BB0_29 Depth=1
	add	x26, x26, #12
	subs	x27, x27, #1
	b.eq	LBB0_20
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldur	w23, [x26, #-8]
	str	wzr, [x26]
	cmn	w23, #1
	b.eq	LBB0_28
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	mov	x0, x23
	mov	x1, x20
	bl	_FD_ISSET
	cbz	x0, LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_29 Depth=1
	ldr	w8, [x28]
	ldr	w9, [x26]
	orr	w8, w9, w8
	str	w8, [x26]
LBB0_32:                                ;   in Loop: Header=BB0_29 Depth=1
	mov	x0, x23
	mov	x1, x21
	bl	_FD_ISSET
	cbz	x0, LBB0_34
; %bb.33:                               ;   in Loop: Header=BB0_29 Depth=1
Lloh24:
	adrp	x8, _POLLOUT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _POLLOUT@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	w9, [x26]
	orr	w8, w9, w8
	str	w8, [x26]
LBB0_34:                                ;   in Loop: Header=BB0_29 Depth=1
	mov	x0, x23
	mov	x1, x22
	bl	_FD_ISSET
	cbz	x0, LBB0_28
; %bb.35:                               ;   in Loop: Header=BB0_29 Depth=1
	ldr	w8, [x19]
	ldr	w9, [x26]
	orr	w8, w9, w8
	str	w8, [x26]
	b	LBB0_28
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_FD_SETSIZE,4,2                 ; @FD_SETSIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_NFDBITS,4,2                    ; @NFDBITS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_POLLERR,4,2                    ; @POLLERR
.subsections_via_symbols
