	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libsrt_network_wait_fd
_libsrt_network_wait_fd:                ## @libsrt_network_wait_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	$1, -36(%rbp)
	testl	%ecx, %ecx
	jne	LBB0_1
## %bb.2:
	movq	_SRT_EPOLL_IN@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_SRT_EPOLL_OUT@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %rdx
	movl	%r12d, %edi
	movl	%r15d, %esi
	callq	_srt_epoll_add_usock
	testq	%rax, %rax
	js	LBB0_13
## %bb.4:
	movq	_POLLING_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:
	leaq	-40(%rbp), %rcx
	leaq	-36(%rbp), %r8
	movl	%r12d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	jmp	LBB0_7
LBB0_6:
	leaq	-40(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	movl	%r12d, %edi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
LBB0_7:
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	callq	_srt_epoll_wait
	addq	$32, %rsp
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_12
## %bb.8:
	xorl	%edi, %edi
	callq	_srt_getlasterror
	movq	_SRT_ETIMEOUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_11
LBB0_10:
	movq	%r14, %rdi
	callq	_libsrt_neterrno
LBB0_11:
	movl	%eax, %ebx
LBB0_12:
	movl	%r12d, %edi
	movl	%r15d, %esi
	callq	_srt_epoll_remove_usock
	testq	%rax, %rax
	jns	LBB0_14
LBB0_13:
	movq	%r14, %rdi
	callq	_libsrt_neterrno
	movl	%eax, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SRT_EPOLL_OUT,4,2              ## @SRT_EPOLL_OUT
	.comm	_SRT_EPOLL_IN,4,2               ## @SRT_EPOLL_IN
	.comm	_POLLING_TIME,4,2               ## @POLLING_TIME
	.comm	_SRT_ETIMEOUT,8,3               ## @SRT_ETIMEOUT
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_libsrt_network_wait_fd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libsrt_network_wait_fd
_libsrt_network_wait_fd:                ; @libsrt_network_wait_fd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w8, #1
	str	w8, [sp, #28]
Lloh0:
	adrp	x8, _SRT_EPOLL_OUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SRT_EPOLL_OUT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _SRT_EPOLL_IN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SRT_EPOLL_IN@GOTPAGEOFF]
	cmp	w3, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [sp, #24]
	add	x2, sp, #24
	mov	x0, x1
	mov	x1, x20
	bl	_srt_epoll_add_usock
	tbnz	x0, #63, LBB0_11
; %bb.1:
Lloh4:
	adrp	x8, _POLLING_TIME@GOTPAGE
Lloh5:
	ldr	x8, [x8, _POLLING_TIME@GOTPAGEOFF]
Lloh6:
	ldr	w5, [x8]
	cbz	w22, LBB0_3
; %bb.2:
	str	xzr, [sp]
	add	x3, sp, #20
	add	x4, sp, #28
	mov	x0, x21
	mov	x1, #0
	mov	x2, #0
	b	LBB0_4
LBB0_3:
	str	xzr, [sp]
	add	x1, sp, #20
	add	x2, sp, #28
	mov	x0, x21
	mov	x3, #0
	mov	x4, #0
LBB0_4:
	mov	w6, #0
	mov	w7, #0
	bl	_srt_epoll_wait
	tbnz	w0, #31, LBB0_6
; %bb.5:
	mov	w22, #0
	b	LBB0_10
LBB0_6:
	mov	x0, #0
	bl	_srt_getlasterror
Lloh7:
	adrp	x8, _SRT_ETIMEOUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SRT_ETIMEOUT@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:
Lloh10:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_libsrt_neterrno
LBB0_9:
	mov	x22, x0
LBB0_10:
	mov	x0, x21
	mov	x1, x20
	bl	_srt_epoll_remove_usock
	tbz	x0, #63, LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_libsrt_neterrno
	mov	x22, x0
LBB0_12:
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SRT_EPOLL_OUT,4,2              ; @SRT_EPOLL_OUT
	.comm	_SRT_EPOLL_IN,4,2               ; @SRT_EPOLL_IN
	.comm	_POLLING_TIME,4,2               ; @POLLING_TIME
	.comm	_SRT_ETIMEOUT,8,3               ; @SRT_ETIMEOUT
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_libsrt_network_wait_fd
.subsections_via_symbols
