	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sctp_read
_sctp_read:                             ## @sctp_read
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	8(%rdi), %rbx
	movq	_AVIO_FLAG_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_sctp_wait_fd
	testl	%eax, %eax
	js	LBB0_7
LBB0_2:
	cmpq	$0, 8(%rbx)
	je	LBB0_4
## %bb.3:
	movq	$0, -32(%rbp)
	movl	(%rbx), %edi
	leaq	8(%r14), %rsi
	addl	$-2, %r15d
	movl	$0, (%rsp)
	leaq	-32(%rbp), %r9
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ff_sctp_recvmsg
	movl	%eax, %ebx
	movl	-32(%rbp), %esi
	movq	%r14, %rdi
	callq	_AV_WB16
	leal	2(%rbx), %eax
	testl	%ebx, %ebx
	cmovsl	%ebx, %eax
	testl	%eax, %eax
	jns	LBB0_7
LBB0_6:
	xorl	%eax, %eax
	callq	_ff_neterrno
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%rbx), %edi
	movq	%r14, %rsi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_recv
	testl	%eax, %eax
	jns	LBB0_7
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIO_FLAG_NONBLOCK,4,2         ## @AVIO_FLAG_NONBLOCK
	.no_dead_strip	_sctp_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sctp_read
_sctp_read:                             ; @sctp_read
	.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	x20, x2
	mov	x19, x1
	ldr	x21, [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, [x21]
	mov	w1, #0
	bl	_sctp_wait_fd
	tbnz	w0, #31, LBB0_5
LBB0_2:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_6
; %bb.3:
	str	xzr, [sp, #8]
	ldr	w0, [x21]
	add	x1, x19, #8
	sub	w2, w20, #2
	add	x5, sp, #8
	mov	x3, #0
	mov	w4, #0
	mov	w6, #0
	bl	_ff_sctp_recvmsg
	mov	x20, x0
	ldr	w1, [sp, #8]
	mov	x0, x19
	bl	_AV_WB16
	add	w8, w20, #2
	cmp	w20, #0
	csel	w0, w20, w8, lt
	tbz	w0, #31, LBB0_5
LBB0_4:
	bl	_ff_neterrno
LBB0_5:
	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_6:
	ldr	w0, [x21]
	mov	x1, x19
	mov	x2, x20
	mov	w3, #0
	bl	_recv
	tbz	w0, #31, LBB0_5
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIO_FLAG_NONBLOCK,4,2         ; @AVIO_FLAG_NONBLOCK
	.no_dead_strip	_sctp_read
.subsections_via_symbols
