	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function joydev_poll
_joydev_poll:                           ## @joydev_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rdx
	movq	(%rdi), %rbx
	movq	(%rbx), %r14
	leaq	8(%r14), %rsi
	callq	_poll_wait
	movq	%rbx, %rdi
	callq	_joydev_data_pending
	movq	_EPOLLIN@GOTPCREL(%rip), %rcx
	movq	_EPOLLRDNORM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovel	%ecx, %edx
	movq	_EPOLLHUP@GOTPCREL(%rip), %rsi
	movq	_EPOLLERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rsi), %eax
	cmpq	$0, (%r14)
	cmovnel	%ecx, %eax
	orl	%edx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EPOLLIN,4,2                    ## @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ## @EPOLLRDNORM
	.comm	_EPOLLHUP,4,2                   ## @EPOLLHUP
	.comm	_EPOLLERR,4,2                   ## @EPOLLERR
	.no_dead_strip	_joydev_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function joydev_poll
_joydev_poll:                           ; @joydev_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]
	ldr	x20, [x19]
	add	x1, x20, #8
	bl	_poll_wait
	mov	x0, x19
	bl	_joydev_data_pending
Lloh0:
	adrp	x8, _EPOLLIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPOLLIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _EPOLLRDNORM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EPOLLRDNORM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	ldr	x9, [x20]
Lloh6:
	adrp	x10, _EPOLLHUP@GOTPAGE
Lloh7:
	ldr	x10, [x10, _EPOLLHUP@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _EPOLLERR@GOTPAGE
Lloh10:
	ldr	x11, [x11, _EPOLLERR@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	orr	w10, w11, w10
	cmp	x9, #0
	csel	w9, w10, wzr, eq
	orr	w0, w9, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EPOLLIN,4,2                    ; @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ; @EPOLLRDNORM
	.comm	_EPOLLHUP,4,2                   ; @EPOLLHUP
	.comm	_EPOLLERR,4,2                   ; @EPOLLERR
	.no_dead_strip	_joydev_poll
.subsections_via_symbols
