	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sync_file_poll
_sync_file_poll:                        ## @sync_file_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), %rbx
	leaq	4(%rbx), %r14
	movq	%r14, %rsi
	callq	_poll_wait
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_POLL_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%rbx), %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movl	(%rbx), %edi
	movq	_fence_check_cb_func@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_dma_fence_add_callback
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_wake_up_all
LBB0_4:
	movl	(%rbx), %edi
	callq	_dma_fence_is_signaled
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	movq	_EPOLLIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POLL_ENABLED,4,2               ## @POLL_ENABLED
	.comm	_fence_check_cb_func,4,2        ## @fence_check_cb_func
	.comm	_EPOLLIN,4,2                    ## @EPOLLIN
	.no_dead_strip	_sync_file_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sync_file_poll
_sync_file_poll:                        ; @sync_file_poll
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x2, x1
	ldr	x21, [x0]
	add	x19, x21, #4
	mov	x1, x19
	bl	_poll_wait
	add	x20, x21, #8
	mov	x0, x20
	bl	_list_empty
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _POLL_ENABLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POLL_ENABLED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x21, #12
	bl	_test_and_set_bit
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x21]
Lloh3:
	adrp	x8, _fence_check_cb_func@GOTPAGE
Lloh4:
	ldr	x8, [x8, _fence_check_cb_func@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_dma_fence_add_callback
	tbz	x0, #63, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_wake_up_all
LBB0_4:
	ldr	w0, [x21]
	bl	_dma_fence_is_signaled
Lloh6:
	adrp	x8, _EPOLLIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EPOLLIN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, wzr, w8, eq
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_POLL_ENABLED,4,2               ; @POLL_ENABLED
	.comm	_fence_check_cb_func,4,2        ; @fence_check_cb_func
	.comm	_EPOLLIN,4,2                    ; @EPOLLIN
	.no_dead_strip	_sync_file_poll
.subsections_via_symbols
