	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function switchtec_dev_poll
_switchtec_dev_poll:                    ## @switchtec_dev_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	%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	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %r13
	movq	16(%r13), %r15
	leaq	8(%r13), %r14
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_poll_wait
	leaq	8(%r15), %rsi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_poll_wait
	movq	%r15, %rdi
	callq	_lock_mutex_and_test_alive
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EPOLLIN@GOTPCREL(%rip), %rcx
	movq	_EPOLLRDHUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_EPOLLOUT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_EPOLLERR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_EPOLLHUP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_3
LBB0_2:
	leaq	4(%r15), %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_try_wait_for_completion
	movq	_EPOLLIN@GOTPCREL(%rip), %rcx
	movq	_EPOLLRDNORM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rcx), %ebx
	xorl	%r14d, %r14d
	testq	%rax, %rax
	cmovel	%r14d, %ebx
	movq	(%r13), %r12
	movq	%r15, %rdi
	callq	_atomic_read
	movq	%rax, %rcx
	movq	_EPOLLPRI@GOTPCREL(%rip), %rdx
	movq	_EPOLLRDBAND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rdx), %eax
	cmpq	%rcx, %r12
	cmovel	%r14d, %eax
	orl	%ebx, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EPOLLIN,4,2                    ## @EPOLLIN
	.comm	_EPOLLRDHUP,4,2                 ## @EPOLLRDHUP
	.comm	_EPOLLOUT,4,2                   ## @EPOLLOUT
	.comm	_EPOLLERR,4,2                   ## @EPOLLERR
	.comm	_EPOLLHUP,4,2                   ## @EPOLLHUP
	.comm	_EPOLLRDNORM,4,2                ## @EPOLLRDNORM
	.comm	_EPOLLPRI,4,2                   ## @EPOLLPRI
	.comm	_EPOLLRDBAND,4,2                ## @EPOLLRDBAND
	.no_dead_strip	_switchtec_dev_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function switchtec_dev_poll
_switchtec_dev_poll:                    ; @switchtec_dev_poll
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x22, x0
	ldr	x23, [x0]
	ldr	x19, [x23, #16]
	add	x20, x23, #8
	mov	x1, x20
	mov	x2, x21
	bl	_poll_wait
	add	x1, x19, #8
	mov	x0, x22
	mov	x2, x21
	bl	_poll_wait
	mov	x0, x19
	bl	_lock_mutex_and_test_alive
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EPOLLIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPOLLIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _EPOLLRDHUP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EPOLLRDHUP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _EPOLLOUT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EPOLLOUT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _EPOLLERR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EPOLLERR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _EPOLLHUP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EPOLLHUP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w0, w8, w9
	b	LBB0_3
LBB0_2:
	add	x0, x19, #4
	bl	_mutex_unlock
	mov	x0, x20
	bl	_try_wait_for_completion
Lloh15:
	adrp	x8, _EPOLLIN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EPOLLIN@GOTPAGEOFF]
Lloh17:
	adrp	x9, _EPOLLRDNORM@GOTPAGE
Lloh18:
	ldr	x9, [x9, _EPOLLRDNORM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	x0, #0
	csel	w20, wzr, w8, eq
	ldr	x21, [x23]
	mov	x0, x19
	bl	_atomic_read
Lloh21:
	adrp	x8, _EPOLLPRI@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EPOLLPRI@GOTPAGEOFF]
Lloh23:
	adrp	x9, _EPOLLRDBAND@GOTPAGE
Lloh24:
	ldr	x9, [x9, _EPOLLRDBAND@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	x21, x0
	csel	w8, wzr, w8, eq
	orr	w0, w8, w20
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EPOLLIN,4,2                    ; @EPOLLIN
	.comm	_EPOLLRDHUP,4,2                 ; @EPOLLRDHUP
	.comm	_EPOLLOUT,4,2                   ; @EPOLLOUT
	.comm	_EPOLLERR,4,2                   ; @EPOLLERR
	.comm	_EPOLLHUP,4,2                   ; @EPOLLHUP
	.comm	_EPOLLRDNORM,4,2                ; @EPOLLRDNORM
	.comm	_EPOLLPRI,4,2                   ; @EPOLLPRI
	.comm	_EPOLLRDBAND,4,2                ; @EPOLLRDBAND
	.no_dead_strip	_switchtec_dev_poll
.subsections_via_symbols
