	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goldfish_pipe_poll
_goldfish_pipe_poll:                    ## @goldfish_pipe_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rdx
	movq	(%rdi), %r14
	leaq	4(%r14), %rsi
	callq	_poll_wait
	movq	_PIPE_CMD_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_goldfish_pipe_cmd
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r15d
	movq	_PIPE_POLL_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_EPOLLIN@GOTPCREL(%rip), %rdx
	movq	_EPOLLRDNORM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rdx), %eax
	andl	%r15d, %ecx
	testl	%ecx, %ecx
	cmovel	%ecx, %eax
	movq	_PIPE_POLL_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_EPOLLOUT@GOTPCREL(%rip), %rdx
	movq	_EPOLLWRNORM@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ebx
	orl	(%rdx), %ebx
	andl	%r15d, %ecx
	testl	%ecx, %ecx
	cmovel	%ecx, %ebx
	movq	_PIPE_POLL_HUP@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r15d
	je	LBB0_4
## %bb.3:
	movq	_EPOLLHUP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
LBB0_4:
	orl	%eax, %ebx
	movq	_BIT_CLOSED_ON_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	xorl	%ecx, %ecx
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_EPOLLERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_6:
	orl	%ecx, %ebx
	orl	%ebx, %r15d
	jmp	LBB0_7
LBB0_1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIPE_CMD_POLL,4,2              ## @PIPE_CMD_POLL
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_PIPE_POLL_IN,4,2               ## @PIPE_POLL_IN
	.comm	_EPOLLIN,4,2                    ## @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ## @EPOLLRDNORM
	.comm	_PIPE_POLL_OUT,4,2              ## @PIPE_POLL_OUT
	.comm	_EPOLLOUT,4,2                   ## @EPOLLOUT
	.comm	_EPOLLWRNORM,4,2                ## @EPOLLWRNORM
	.comm	_PIPE_POLL_HUP,4,2              ## @PIPE_POLL_HUP
	.comm	_EPOLLHUP,4,2                   ## @EPOLLHUP
	.comm	_BIT_CLOSED_ON_HOST,4,2         ## @BIT_CLOSED_ON_HOST
	.comm	_EPOLLERR,4,2                   ## @EPOLLERR
	.no_dead_strip	_goldfish_pipe_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goldfish_pipe_poll
_goldfish_pipe_poll:                    ; @goldfish_pipe_poll
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x2, x1
	ldr	x19, [x0]
	add	x1, x19, #4
	bl	_poll_wait
Lloh0:
	adrp	x8, _PIPE_CMD_POLL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PIPE_CMD_POLL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_goldfish_pipe_cmd
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _PIPE_POLL_IN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PIPE_POLL_IN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _EPOLLIN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EPOLLIN@GOTPAGEOFF]
Lloh8:
	adrp	x10, _EPOLLRDNORM@GOTPAGE
Lloh9:
	ldr	x10, [x10, _EPOLLRDNORM@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w8, w0
Lloh12:
	adrp	x8, _PIPE_POLL_OUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PIPE_POLL_OUT@GOTPAGEOFF]
	csel	w9, wzr, w9, eq
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x10, _EPOLLOUT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _EPOLLOUT@GOTPAGEOFF]
Lloh17:
	adrp	x11, _EPOLLWRNORM@GOTPAGE
Lloh18:
	ldr	x11, [x11, _EPOLLWRNORM@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
Lloh20:
	ldr	w11, [x11]
	orr	w10, w11, w10
	tst	w8, w0
	csel	w8, wzr, w10, eq
	orr	w8, w8, w9
Lloh21:
	adrp	x9, _PIPE_POLL_HUP@GOTPAGE
Lloh22:
	ldr	x9, [x9, _PIPE_POLL_HUP@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
Lloh24:
	adrp	x10, _EPOLLHUP@GOTPAGE
Lloh25:
	ldr	x10, [x10, _EPOLLHUP@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	tst	w9, w0
	csel	w9, wzr, w10, eq
	orr	w20, w8, w9
Lloh27:
	adrp	x8, _BIT_CLOSED_ON_HOST@GOTPAGE
Lloh28:
	ldr	x8, [x8, _BIT_CLOSED_ON_HOST@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
Lloh30:
	adrp	x8, _EPOLLERR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EPOLLERR@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w0, w20, w8
	b	LBB0_3
LBB0_2:
Lloh33:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_PIPE_CMD_POLL,4,2              ; @PIPE_CMD_POLL
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_PIPE_POLL_IN,4,2               ; @PIPE_POLL_IN
	.comm	_EPOLLIN,4,2                    ; @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ; @EPOLLRDNORM
	.comm	_PIPE_POLL_OUT,4,2              ; @PIPE_POLL_OUT
	.comm	_EPOLLOUT,4,2                   ; @EPOLLOUT
	.comm	_EPOLLWRNORM,4,2                ; @EPOLLWRNORM
	.comm	_PIPE_POLL_HUP,4,2              ; @PIPE_POLL_HUP
	.comm	_EPOLLHUP,4,2                   ; @EPOLLHUP
	.comm	_BIT_CLOSED_ON_HOST,4,2         ; @BIT_CLOSED_ON_HOST
	.comm	_EPOLLERR,4,2                   ; @EPOLLERR
	.no_dead_strip	_goldfish_pipe_poll
.subsections_via_symbols
