	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sctp_write
_sctp_write:                            ## @sctp_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	movq	_AVIO_FLAG_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_2
## %bb.1:
	movl	8(%rbx), %edi
	movl	$1, %esi
	callq	_sctp_wait_fd
	testl	%eax, %eax
	js	LBB0_9
LBB0_2:
	cmpq	$0, (%rbx)
	je	LBB0_6
## %bb.3:
	movq	$0, -40(%rbp)
	movq	%r15, %rdi
	callq	_AV_RB16
	movq	%rax, -48(%rbp)
	cmpq	(%rbx), %rax
	jle	LBB0_5
## %bb.4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
	movq	_AVERROR_BUG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_6:
	movl	8(%rbx), %edi
	movq	_MSG_NOSIGNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_send
	testl	%eax, %eax
	jns	LBB0_9
LBB0_8:
	xorl	%eax, %eax
	callq	_ff_neterrno
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	8(%rbx), %edi
	addq	$8, %r15
	addl	$-2, %r14d
	movq	_MSG_EOR@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-48(%rbp), %rcx
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_ff_sctp_send
	testl	%eax, %eax
	jns	LBB0_9
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIO_FLAG_NONBLOCK,4,2         ## @AVIO_FLAG_NONBLOCK
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad input data\n"

	.comm	_AVERROR_BUG,4,2                ## @AVERROR_BUG
	.comm	_MSG_EOR,4,2                    ## @MSG_EOR
	.comm	_MSG_NOSIGNAL,4,2               ## @MSG_NOSIGNAL
	.no_dead_strip	_sctp_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sctp_write
_sctp_write:                            ; @sctp_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0, #8]
	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.ne	LBB0_2
; %bb.1:
	ldr	w0, [x22, #8]
	mov	w1, #1
	bl	_sctp_wait_fd
	tbnz	w0, #31, LBB0_7
LBB0_2:
	ldr	x8, [x22]
	cbz	x8, LBB0_5
; %bb.3:
	str	xzr, [sp, #8]
	mov	x0, x20
	bl	_AV_RB16
	str	x0, [sp]
	ldr	x8, [x22]
	cmp	x0, x8
	b.le	LBB0_8
; %bb.4:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
Lloh8:
	adrp	x8, _AVERROR_BUG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AVERROR_BUG@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_5:
	ldr	w0, [x22, #8]
Lloh11:
	adrp	x8, _MSG_NOSIGNAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSG_NOSIGNAL@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x1, x20
	mov	x2, x19
	bl	_send
	tbz	w0, #31, LBB0_7
LBB0_6:
	bl	_ff_neterrno
LBB0_7:
	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
	add	sp, sp, #64
	ret
LBB0_8:
	ldr	w0, [x22, #8]
	add	x1, x20, #8
	sub	w2, w19, #2
Lloh14:
	adrp	x8, _MSG_EOR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MSG_EOR@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	mov	x3, sp
	bl	_ff_sctp_send
	tbz	w0, #31, LBB0_7
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIO_FLAG_NONBLOCK,4,2         ; @AVIO_FLAG_NONBLOCK
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad input data\n"

	.comm	_AVERROR_BUG,4,2                ; @AVERROR_BUG
	.comm	_MSG_EOR,4,2                    ; @MSG_EOR
	.comm	_MSG_NOSIGNAL,4,2               ; @MSG_NOSIGNAL
	.no_dead_strip	_sctp_write
.subsections_via_symbols
