	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function io_wait
_io_wait:                               ## @io_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%ecx, %ecx
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %rdx
	testl	%r12d, %r12d
	setne	%cl
	jne	LBB0_2
## %bb.1:
	movq	_POLLOUT@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
LBB0_2:
	movl	8(%r15,%rcx,4), %ecx
	movl	%ecx, -80(%rbp)
	movq	%rdx, -88(%rbp)
	movq	_user_abort_pipe@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -56(%rbp)
	movq	%rax, -64(%rbp)
	leaq	-96(%rbp), %rdi
	movl	$2, %esi
	movl	%ebx, %edx
	callq	_poll
	movq	_user_abort@GOTPCREL(%rip), %r14
	movq	_IO_WAIT_ERROR@GOTPCREL(%rip), %r13
	cmpq	$0, (%r14)
	je	LBB0_3
LBB0_13:
	movl	(%r13), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%r12d, -100(%rbp)               ## 4-byte Spill
	movq	%r15, -112(%rbp)                ## 8-byte Spill
	movq	_EINTR@GOTPCREL(%rip), %r15
	leaq	-96(%rbp), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	$2, %esi
	movl	%ebx, %edx
	callq	_poll
	cmpq	$0, (%r14)
	jne	LBB0_13
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	testl	%eax, %eax
	je	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, -96(%rbp)
	je	LBB0_12
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%r15), %rax
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.9:
	xorl	%ebx, %ebx
	cmpl	$0, -100(%rbp)                  ## 4-byte Folded Reload
	setne	%bl
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %r15d
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movl	(%rax,%rbx,4), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_message_error
	jmp	LBB0_13
LBB0_6:
	movq	_opt_flush_timeout@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	setne	%dil
	callq	_assert
	movq	_flush_needed@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_IO_WAIT_TIMEOUT@GOTPCREL(%rip), %r13
	jmp	LBB0_13
LBB0_11:
	movq	_IO_WAIT_MORE@GOTPCREL(%rip), %r13
	jmp	LBB0_13
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_POLLIN,8,3                     ## @POLLIN
	.comm	_POLLOUT,8,3                    ## @POLLOUT
	.comm	_user_abort_pipe,8,3            ## @user_abort_pipe
	.comm	_user_abort,8,3                 ## @user_abort
	.comm	_IO_WAIT_ERROR,4,2              ## @IO_WAIT_ERROR
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: poll() failed: %s"

	.comm	_opt_flush_timeout,8,3          ## @opt_flush_timeout
	.comm	_flush_needed,4,2               ## @flush_needed
	.comm	_IO_WAIT_TIMEOUT,4,2            ## @IO_WAIT_TIMEOUT
	.comm	_IO_WAIT_MORE,4,2               ## @IO_WAIT_MORE
	.no_dead_strip	_io_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function io_wait
_io_wait:                               ; @io_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
Lloh3:
	adrp	x8, _POLLOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _POLLOUT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _POLLIN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _POLLIN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	w2, #0
	mov	w10, #12
	mov	w11, #8
	csel	x10, x11, x10, eq
	csel	x8, x8, x9, eq
	ldr	w10, [x0, x10]
	str	w10, [sp, #24]
	str	x8, [sp, #16]
Lloh9:
	adrp	x8, _user_abort_pipe@GOTPAGE
Lloh10:
	ldr	x8, [x8, _user_abort_pipe@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	w8, [sp, #48]
	str	x9, [sp, #40]
	add	x0, sp, #8
	mov	w1, #2
	mov	x2, x21
	bl	_poll
Lloh12:
	adrp	x24, _user_abort@GOTPAGE
Lloh13:
	ldr	x24, [x24, _user_abort@GOTPAGEOFF]
	ldr	x8, [x24]
	cbz	x8, LBB0_4
LBB0_1:
Lloh14:
	adrp	x22, _IO_WAIT_ERROR@GOTPAGE
Lloh15:
	ldr	x22, [x22, _IO_WAIT_ERROR@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x22]
	ldr	x8, [sp, #56]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.3:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_4:
Lloh19:
	adrp	x23, _errno@GOTPAGE
Lloh20:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh21:
	adrp	x25, _EINTR@GOTPAGE
Lloh22:
	ldr	x25, [x25, _EINTR@GOTPAGEOFF]
Lloh23:
	adrp	x26, _EAGAIN@GOTPAGE
Lloh24:
	ldr	x26, [x26, _EAGAIN@GOTPAGEOFF]
Lloh25:
	adrp	x27, _IO_WAIT_ERROR@GOTPAGE
Lloh26:
	ldr	x27, [x27, _IO_WAIT_ERROR@GOTPAGEOFF]
Lloh27:
	adrp	x22, _IO_WAIT_MORE@GOTPAGE
Lloh28:
	ldr	x22, [x22, _IO_WAIT_MORE@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x23]
	ldr	x9, [x25]
	ldr	x10, [x26]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_12
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #8
	mov	w1, #2
	mov	x2, x21
	bl	_poll
	ldr	x8, [x24]
	cbnz	x8, LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cbz	w0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_6
	b	LBB0_2
LBB0_10:
	mov	x22, x27
	b	LBB0_2
LBB0_11:
Lloh29:
	adrp	x8, _opt_flush_timeout@GOTPAGE
Lloh30:
	ldr	x8, [x8, _opt_flush_timeout@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
Lloh32:
	adrp	x8, _flush_needed@GOTPAGE
Lloh33:
	ldr	x8, [x8, _flush_needed@GOTPAGEOFF]
	mov	w9, #1
Lloh34:
	str	w9, [x8]
Lloh35:
	adrp	x22, _IO_WAIT_TIMEOUT@GOTPAGE
Lloh36:
	ldr	x22, [x22, _IO_WAIT_TIMEOUT@GOTPAGEOFF]
	b	LBB0_2
LBB0_12:
	cmp	w20, #0
	cset	w21, ne
Lloh37:
	adrp	x0, l_.str@PAGE
Lloh38:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	mov	x20, x0
	ldr	w19, [x19, w21, uxtw #2]
	ldr	x0, [x23]
	bl	_strerror
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_message_error
	b	LBB0_1
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_POLLIN,8,3                     ; @POLLIN
	.comm	_POLLOUT,8,3                    ; @POLLOUT
	.comm	_user_abort_pipe,8,3            ; @user_abort_pipe
	.comm	_user_abort,8,3                 ; @user_abort
	.comm	_IO_WAIT_ERROR,4,2              ; @IO_WAIT_ERROR
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: poll() failed: %s"

	.comm	_opt_flush_timeout,8,3          ; @opt_flush_timeout
	.comm	_flush_needed,4,2               ; @flush_needed
	.comm	_IO_WAIT_TIMEOUT,4,2            ; @IO_WAIT_TIMEOUT
	.comm	_IO_WAIT_MORE,4,2               ; @IO_WAIT_MORE
	.no_dead_strip	_io_wait
.subsections_via_symbols
