	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___scif_pollfd                  ## -- Begin function __scif_pollfd
	.p2align	4, 0x90
___scif_pollfd:                         ## @__scif_pollfd
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_scif_info@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_scif_ep_states@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rdx), %rcx
	movl	(%rax,%rcx,4), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	8(%rbx), %rax
	movq	_ASYNC_CONN_INPROGRESS@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_7
## %bb.1:
	leaq	64(%rbx), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	__scif_poll_wait
	movq	8(%rbx), %rax
	cmpq	(%r13), %rax
	jne	LBB0_7
## %bb.2:
	movq	(%rbx), %rax
	movq	_SCIFEP_CONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.3:
	movq	_SCIFEP_DISCONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.4:
	cmpq	$0, 56(%rbx)
	je	LBB0_5
LBB0_6:
	movq	_EPOLLOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_7:
	movq	(%rbx), %rax
	movq	_SCIFEP_LISTENING@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_11
## %bb.8:
	leaq	48(%rbx), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	__scif_poll_wait
	movq	(%rbx), %rax
	cmpq	(%r13), %rax
	jne	LBB0_11
## %bb.9:
	xorl	%r15d, %r15d
	cmpq	$0, 40(%rbx)
	je	LBB0_27
## %bb.10:
	movq	_EPOLLIN@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_11:
	movq	_SCIFEP_CONNECTED@GOTPCREL(%rip), %r13
	movq	_SCIFEP_DISCONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%r13), %rax
	je	LBB0_13
## %bb.12:
	cmpq	(%rcx), %rax
	jne	LBB0_25
LBB0_13:
	movq	%r15, %rdi
	callq	_poll_requested_events
	movq	_EPOLLIN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.14:
	leaq	36(%rbx), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	__scif_poll_wait
LBB0_15:
	movq	%r15, %rdi
	callq	_poll_requested_events
	movq	_EPOLLOUT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.16:
	leaq	32(%rbx), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	__scif_poll_wait
LBB0_17:
	movq	(%rbx), %rax
	cmpq	(%r13), %rax
	movq	_SCIFEP_DISCONNECTED@GOTPCREL(%rip), %rcx
	je	LBB0_19
## %bb.18:
	cmpq	(%rcx), %rax
	je	LBB0_19
LBB0_25:
	movq	_EPOLLERR@GOTPCREL(%rip), %rax
LBB0_26:
	movl	(%rax), %r15d
LBB0_27:
	movq	%r14, %rdi
	callq	_spin_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	24(%rbx), %rdi
	addq	$4, %rdi
	movl	$1, %esi
	callq	_scif_rb_count
	xorl	%r15d, %r15d
	movl	$0, %r12d
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	_EPOLLIN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_21:
	movq	24(%rbx), %rdi
	callq	_scif_rb_space
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	_EPOLLOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_23:
	orl	%r12d, %r15d
	movq	(%rbx), %rax
	movq	_SCIFEP_DISCONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_27
## %bb.24:
	movq	_EPOLLHUP@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	jmp	LBB0_27
LBB0_5:
	xorl	%r15d, %r15d
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_scif_info,4,2                  ## @scif_info
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SCIFAPI pollfd: ep %p %s\n"

	.comm	_scif_ep_states,8,3             ## @scif_ep_states
	.comm	_ASYNC_CONN_INPROGRESS,8,3      ## @ASYNC_CONN_INPROGRESS
	.comm	_SCIFEP_CONNECTED,8,3           ## @SCIFEP_CONNECTED
	.comm	_SCIFEP_DISCONNECTED,8,3        ## @SCIFEP_DISCONNECTED
	.comm	_EPOLLOUT,4,2                   ## @EPOLLOUT
	.comm	_SCIFEP_LISTENING,8,3           ## @SCIFEP_LISTENING
	.comm	_EPOLLIN,4,2                    ## @EPOLLIN
	.comm	_EPOLLHUP,4,2                   ## @EPOLLHUP
	.comm	_EPOLLERR,4,2                   ## @EPOLLERR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___scif_pollfd                  ; -- Begin function __scif_pollfd
	.p2align	2
___scif_pollfd:                         ; @__scif_pollfd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _scif_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _scif_info@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _scif_ep_states@GOTPAGE
Lloh4:
	ldr	x8, [x8, _scif_ep_states@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x9, [x2]
	ldr	w3, [x8, x9, lsl #2]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	add	x19, x20, #16
	mov	x0, x19
	bl	_spin_lock
	ldr	x8, [x20, #8]
Lloh8:
	adrp	x23, _ASYNC_CONN_INPROGRESS@GOTPAGE
Lloh9:
	ldr	x23, [x23, _ASYNC_CONN_INPROGRESS@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	add	x1, x20, #64
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	bl	__scif_poll_wait
	ldr	x8, [x20, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	ldr	x8, [x20]
Lloh10:
	adrp	x9, _SCIFEP_CONNECTED@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SCIFEP_CONNECTED@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
Lloh13:
	adrp	x10, _SCIFEP_DISCONNECTED@GOTPAGE
Lloh14:
	ldr	x10, [x10, _SCIFEP_DISCONNECTED@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x20, #56]
	cbz	x8, LBB0_20
LBB0_4:
Lloh16:
	adrp	x8, _EPOLLOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EPOLLOUT@GOTPAGEOFF]
	b	LBB0_16
LBB0_5:
	ldr	x8, [x20]
Lloh18:
	adrp	x23, _SCIFEP_LISTENING@GOTPAGE
Lloh19:
	ldr	x23, [x23, _SCIFEP_LISTENING@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	add	x1, x20, #48
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	bl	__scif_poll_wait
	ldr	x8, [x20]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x20, #40]
Lloh20:
	adrp	x9, _EPOLLIN@GOTPAGE
Lloh21:
	ldr	x9, [x9, _EPOLLIN@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w21, wzr, w9, eq
	b	LBB0_17
LBB0_8:
Lloh23:
	adrp	x25, _SCIFEP_CONNECTED@GOTPAGE
Lloh24:
	ldr	x25, [x25, _SCIFEP_CONNECTED@GOTPAGEOFF]
	ldr	x9, [x25]
Lloh25:
	adrp	x23, _SCIFEP_DISCONNECTED@GOTPAGE
Lloh26:
	ldr	x23, [x23, _SCIFEP_DISCONNECTED@GOTPAGEOFF]
	ldr	x10, [x23]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_15
; %bb.9:
	mov	x0, x21
	bl	_poll_requested_events
Lloh27:
	adrp	x24, _EPOLLIN@GOTPAGE
Lloh28:
	ldr	x24, [x24, _EPOLLIN@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.10:
	add	x1, x20, #36
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	bl	__scif_poll_wait
LBB0_11:
	mov	x0, x21
	bl	_poll_requested_events
Lloh29:
	adrp	x26, _EPOLLOUT@GOTPAGE
Lloh30:
	ldr	x26, [x26, _EPOLLOUT@GOTPAGEOFF]
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_13
; %bb.12:
	add	x1, x20, #32
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	bl	__scif_poll_wait
LBB0_13:
	ldr	x8, [x20]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_18
; %bb.14:
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_18
LBB0_15:
Lloh31:
	adrp	x8, _EPOLLERR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EPOLLERR@GOTPAGEOFF]
LBB0_16:
	ldr	w21, [x8]
LBB0_17:
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x21
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_18:
	ldr	x8, [x20, #24]
	add	x0, x8, #4
	mov	w1, #1
	bl	_scif_rb_count
	ldr	w8, [x24]
	cmp	x0, #0
	csel	w21, wzr, w8, eq
	ldr	x0, [x20, #24]
	bl	_scif_rb_space
	ldr	w8, [x26]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w21, w8, w21
	ldr	x8, [x20]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.19:
Lloh33:
	adrp	x8, _EPOLLHUP@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EPOLLHUP@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	orr	w21, w8, w21
	b	LBB0_17
LBB0_20:
	mov	w21, #0
	b	LBB0_17
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_scif_info,4,2                  ; @scif_info
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SCIFAPI pollfd: ep %p %s\n"

	.comm	_scif_ep_states,8,3             ; @scif_ep_states
	.comm	_ASYNC_CONN_INPROGRESS,8,3      ; @ASYNC_CONN_INPROGRESS
	.comm	_SCIFEP_CONNECTED,8,3           ; @SCIFEP_CONNECTED
	.comm	_SCIFEP_DISCONNECTED,8,3        ; @SCIFEP_DISCONNECTED
	.comm	_EPOLLOUT,4,2                   ; @EPOLLOUT
	.comm	_SCIFEP_LISTENING,8,3           ; @SCIFEP_LISTENING
	.comm	_EPOLLIN,4,2                    ; @EPOLLIN
	.comm	_EPOLLHUP,4,2                   ; @EPOLLHUP
	.comm	_EPOLLERR,4,2                   ; @EPOLLERR
.subsections_via_symbols
