	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libsrt_write
_libsrt_write:                          ## @libsrt_write
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	16(%rdi), %r12
	movq	_AVIO_FLAG_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
LBB0_2:
	movl	(%r12), %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	movl	$-1, %ecx
	xorl	%r8d, %r8d
	callq	_srt_sendmsg
	testl	%eax, %eax
	jns	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_libsrt_neterrno                ## TAILCALL
LBB0_1:
	movl	(%r12), %edx
	movl	4(%r12), %esi
	movl	8(%rbx), %r8d
	leaq	4(%rbx), %r9
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_libsrt_network_wait_fd_timeout
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIO_FLAG_NONBLOCK,4,2         ## @AVIO_FLAG_NONBLOCK
	.no_dead_strip	_libsrt_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libsrt_write
_libsrt_write:                          ; @libsrt_write
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0, #16]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _AVIO_FLAG_NONBLOCK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVIO_FLAG_NONBLOCK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
LBB0_1:
	ldr	w0, [x22]
	mov	x1, x21
	mov	x2, x20
	mov	w3, #-1
	mov	w4, #0
	bl	_srt_sendmsg
	tbz	w0, #31, LBB0_4
; %bb.2:
	mov	x0, x19
	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
	b	_libsrt_neterrno
LBB0_3:
	ldp	w2, w1, [x22]
	add	x5, x19, #4
	ldr	w4, [x19, #8]
	mov	x0, x19
	mov	w3, #1
	bl	_libsrt_network_wait_fd_timeout
	cbz	w0, LBB0_1
LBB0_4:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIO_FLAG_NONBLOCK,4,2         ; @AVIO_FLAG_NONBLOCK
	.no_dead_strip	_libsrt_write
.subsections_via_symbols
