	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_add_sigio_fd                   ## -- Begin function add_sigio_fd
	.p2align	4, 0x90
_add_sigio_fd:                          ## @add_sigio_fd
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_sigio_lock
	movq	_all_sigio_fds@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$0, %ebx
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.1:
	movq	8(%rax), %rdx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r12d, (%rdx,%rbx,4)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rbx, %rcx
	jne	LBB0_2
## %bb.4:
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_5:
	cmpl	%ecx, %ebx
	je	LBB0_12
## %bb.6:
	movq	8(%rax), %rdx
	movq	_current_poll@GOTPCREL(%rip), %rax
	movslq	(%rax), %r13
	movl	%r13d, %r15d
	testq	%r13, %r13
	jle	LBB0_10
## %bb.7:
	movq	8(%rax), %rax
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r12d, (%rax,%rcx,4)
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_9 Depth=1
	incq	%rcx
	cmpq	%rcx, %r15
	jne	LBB0_9
LBB0_10:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	incl	%r15d
	movq	_next_poll@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_need_poll
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %ebx
	movq	8(%r12), %rdi
	movq	_current_poll@GOTPCREL(%rip), %rax
	movq	8(%rax), %rsi
	movl	(%rax), %edx
	shll	$2, %edx
	callq	_memcpy
	movq	8(%r12), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rbx,4), %ecx
	movl	%ecx, (%rax,%r13,4)
	movl	%r15d, (%r12)
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_update_thread
LBB0_12:
	xorl	%eax, %eax
	callq	_sigio_unlock
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_all_sigio_fds,16,3             ## @all_sigio_fds
	.comm	_current_poll,16,3              ## @current_poll
	.comm	_next_poll,16,3                 ## @next_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_add_sigio_fd                   ; -- Begin function add_sigio_fd
	.p2align	2
_add_sigio_fd:                          ; @add_sigio_fd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_sigio_lock
Lloh0:
	adrp	x8, _all_sigio_fds@GOTPAGE
Lloh1:
	ldr	x8, [x8, _all_sigio_fds@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x22, #0
	ldr	x10, [x8, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x22, lsl #2]
	cmp	w11, w19
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	cmp	x9, x22
	b.ne	LBB0_2
	b	LBB0_12
LBB0_4:
	mov	w22, #0
LBB0_5:
	cmp	w22, w9
	b.eq	LBB0_12
; %bb.6:
	ldr	x23, [x8, #8]
Lloh2:
	adrp	x24, _current_poll@GOTPAGE
Lloh3:
	ldr	x24, [x24, _current_poll@GOTPAGEOFF]
	ldr	w25, [x24]
	cmp	w25, #1
	b.lt	LBB0_10
; %bb.7:
	ldr	x8, [x24, #8]
	mov	x9, x25
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x8]
	cmp	w10, w19
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x8, x8, #4
	subs	x9, x9, #1
	b.ne	LBB0_8
LBB0_10:
	add	w19, w25, #1
Lloh4:
	adrp	x20, _next_poll@GOTPAGE
Lloh5:
	ldr	x20, [x20, _next_poll@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	bl	_need_poll
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.11:
	mov	w21, w22
	sxtw	x22, w25
	ldr	x0, [x20, #8]
	ldr	x1, [x24, #8]
	ldr	w8, [x24]
	lsl	w2, w8, #2
	bl	_memcpy
	ldr	x8, [x20, #8]
	ldr	w9, [x23, x21, lsl #2]
	str	w9, [x8, x22, lsl #2]
	str	w19, [x20]
	bl	_update_thread
LBB0_12:
	mov	w21, #0
LBB0_13:
	bl	_sigio_unlock
	mov	x0, x21
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_all_sigio_fds,16,3             ; @all_sigio_fds
	.comm	_current_poll,16,3              ; @current_poll
	.comm	_next_poll,16,3                 ; @next_poll
.subsections_via_symbols
