	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flush_wayland_fd               ## -- Begin function flush_wayland_fd
	.p2align	4, 0x90
_flush_wayland_fd:                      ## @flush_wayland_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$0, -44(%rbp)
	movq	$0, -52(%rbp)
	movl	(%rdi), %edi
	callq	_wl_display_dispatch_pending
	movl	(%rbx), %edi
	callq	_wl_display_flush
	movl	4(%rbx), %eax
	movq	_POLLIN@GOTPCREL(%rip), %r15
	movq	_POLLOUT@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	orl	(%r15), %ecx
	movl	%eax, -48(%rbp)
	movq	_POLLERR@GOTPCREL(%rip), %r12
	orl	(%r12), %ecx
	movq	_POLLHUP@GOTPCREL(%rip), %r13
	orl	(%r13), %ecx
	movl	%ecx, -56(%rbp)
	leaq	-56(%rbp), %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_poll
	testq	%rax, %rax
	jle	LBB0_7
## %bb.1:
	movl	-52(%rbp), %eax
	movl	(%r13), %ecx
	orl	(%r12), %ecx
	testl	%eax, %ecx
	je	LBB0_3
## %bb.2:
	movl	4(%rbx), %edi
	callq	_close
	movl	$1, %edi
	callq	_frontend_driver_set_signal_handler_state
	movl	-52(%rbp), %eax
LBB0_3:
	testl	%eax, (%r15)
	je	LBB0_5
## %bb.4:
	movl	(%rbx), %edi
	callq	_wl_display_dispatch
	movl	-52(%rbp), %eax
LBB0_5:
	testl	%eax, (%r14)
	je	LBB0_7
## %bb.6:
	movl	(%rbx), %edi
	callq	_wl_display_flush
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_POLLERR,4,2                    ## @POLLERR
	.comm	_POLLHUP,4,2                    ## @POLLHUP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flush_wayland_fd               ; -- Begin function flush_wayland_fd
	.p2align	2
_flush_wayland_fd:                      ; @flush_wayland_fd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	str	wzr, [sp, #12]
	stur	xzr, [sp, #4]
	ldr	w0, [x0]
	bl	_wl_display_dispatch_pending
	ldr	w0, [x19]
	bl	_wl_display_flush
	ldr	w8, [x19, #4]
Lloh0:
	adrp	x21, _POLLIN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _POLLIN@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh2:
	adrp	x20, _POLLOUT@GOTPAGE
Lloh3:
	ldr	x20, [x20, _POLLOUT@GOTPAGEOFF]
	ldr	w10, [x20]
	orr	w9, w10, w9
Lloh4:
	adrp	x22, _POLLERR@GOTPAGE
Lloh5:
	ldr	x22, [x22, _POLLERR@GOTPAGEOFF]
	ldr	w10, [x22]
	orr	w9, w9, w10
Lloh6:
	adrp	x23, _POLLHUP@GOTPAGE
Lloh7:
	ldr	x23, [x23, _POLLHUP@GOTPAGEOFF]
	ldr	w10, [x23]
	orr	w9, w9, w10
	str	w8, [sp, #8]
	str	w9, [sp]
	mov	x0, sp
	mov	w1, #1
	mov	w2, #0
	bl	_poll
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.1:
	ldr	w8, [sp, #4]
	ldr	w9, [x22]
	ldr	w10, [x23]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_close
	mov	w0, #1
	bl	_frontend_driver_set_signal_handler_state
	ldr	w8, [sp, #4]
LBB0_3:
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x19]
	bl	_wl_display_dispatch
	ldr	w8, [sp, #4]
LBB0_5:
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [x19]
	bl	_wl_display_flush
LBB0_7:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_POLLERR,4,2                    ; @POLLERR
	.comm	_POLLHUP,4,2                    ; @POLLHUP
.subsections_via_symbols
