	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dgram_sctp_write
_dgram_sctp_write:                      ## @dgram_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rbx
	movl	$44, %edi
	callq	_CMSG_SPACE
	movq	%rsp, -96(%rbp)                 ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	xorl	%eax, %eax
	callq	_clear_socket_error
	cmpb	$23, (%r12)
	jne	LBB0_2
## %bb.1:
	leaq	24(%rbx), %r15
	jmp	LBB0_3
LBB0_2:
	leaq	-200(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$44, %edx
	callq	_memset
LBB0_3:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.4:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_BIO_dgram_sctp_wait_for_dry
	movl	$-1, %r13d
	testl	%eax, %eax
	js	LBB0_10
## %bb.5:
	je	LBB0_6
LBB0_7:
	movq	%r12, -64(%rbp)
	movl	-76(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -56(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -112(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, -120(%rbp)
	movl	$1, -152(%rbp)
	movq	%r14, -128(%rbp)
	movq	$0, -136(%rbp)
	movq	_IPPROTO_SCTP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r14)
	movq	_SCTP_SNDRCV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movl	$44, %edi
	callq	_CMSG_LEN
	movq	%rax, (%r14)
	movq	%r14, %rdi
	callq	_CMSG_DATA
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$44, %edx
	callq	_memset
	movl	28(%r15), %eax
	movl	%eax, 32(%rbx)
	movl	24(%r15), %eax
	movl	%eax, 20(%rbx)
	movl	12(%r15), %eax
	movl	%eax, 16(%rbx)
	movl	4(%r15), %eax
	movl	%eax, 8(%rbx)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %eax
	movl	%eax, (%rbx)
	movl	$44, %edi
	callq	_CMSG_SPACE
	movq	%rax, -144(%rbp)
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	leaq	-152(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sendmsg
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_BIO_clear_retry_flags
	testl	%r13d, %r13d
	jg	LBB0_10
## %bb.8:
	movl	%r13d, %edi
	callq	_BIO_dgram_should_retry
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	_BIO_set_retry_write
	xorl	%eax, %eax
	callq	_get_last_socket_error
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_10
LBB0_6:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_BIO_clear_retry_flags
	movq	%rbx, %rdi
	callq	_BIO_set_retry_write
LBB0_10:
	movq	-96(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%r13d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IPPROTO_SCTP,8,3               ## @IPPROTO_SCTP
	.comm	_SCTP_SNDRCV,4,2                ## @SCTP_SNDRCV
	.comm	_SCTP_PRINFO,4,2                ## @SCTP_PRINFO
	.comm	_SCTP_SACK_IMMEDIATELY,4,2      ## @SCTP_SACK_IMMEDIATELY
	.comm	_SCTP_SNDINFO,4,2               ## @SCTP_SNDINFO
	.no_dead_strip	_dgram_sctp_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dgram_sctp_write
_dgram_sctp_write:                      ; @dgram_sctp_write
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #128
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldr	x24, [x0, #8]
	mov	w0, #44
	bl	_CMSG_SPACE
	mov	x23, sp
	mov	x9, x0
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x0, #15
	and	x9, x9, #0xfffffffffffffff0
	sub	x20, x8, x9
	mov	sp, x20
	bl	_clear_socket_error
	ldrb	w8, [x22]
	cmp	w8, #23
	b.ne	LBB0_2
; %bb.1:
	add	x25, x24, #24
	ldr	x8, [x24, #8]
	cbnz	x8, LBB0_3
	b	LBB0_5
LBB0_2:
	sub	x25, x29, #136
	sub	x0, x29, #136
	mov	w1, #0
	mov	w2, #44
	bl	_memset
	ldr	x8, [x24, #8]
	cbz	x8, LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_BIO_dgram_sctp_wait_for_dry
	tbnz	w0, #31, LBB0_9
; %bb.4:
	cbz	w0, LBB0_8
LBB0_5:
	stur	x22, [x29, #-88]
	stur	w21, [x29, #-80]
	stp	xzr, xzr, [x29, #-152]
	sub	x8, x29, #88
	stp	x20, x8, [x29, #-168]
	mov	w8, #1
	stur	w8, [x29, #-192]
	stur	xzr, [x29, #-176]
Lloh5:
	adrp	x8, _IPPROTO_SCTP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IPPROTO_SCTP@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x20, #16]
Lloh8:
	adrp	x8, _SCTP_SNDRCV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SCTP_SNDRCV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	mov	w0, #44
	bl	_CMSG_LEN
	str	x0, [x20]
	mov	x0, x20
	bl	_CMSG_DATA
	mov	x20, x0
	mov	w1, #0
	mov	w2, #44
	bl	_memset
	ldr	w8, [x25, #28]
	str	w8, [x20, #32]
	ldr	w8, [x25, #24]
	str	w8, [x20, #20]
	ldr	w8, [x25, #12]
	str	w8, [x20, #16]
	ldr	w8, [x25, #4]
	str	w8, [x20, #8]
	ldr	w8, [x24, #16]
	str	w8, [x20]
	mov	w0, #44
	bl	_CMSG_SPACE
	stur	x0, [x29, #-184]
	ldr	w0, [x19]
	sub	x1, x29, #192
	mov	w2, #0
	bl	_sendmsg
	mov	x20, x0
	mov	x0, x19
	bl	_BIO_clear_retry_flags
	cmp	w20, #0
	b.gt	LBB0_10
; %bb.6:
	mov	x0, x20
	bl	_BIO_dgram_should_retry
	cbz	x0, LBB0_10
; %bb.7:
	mov	x0, x19
	bl	_BIO_set_retry_write
	bl	_get_last_socket_error
	str	w0, [x24]
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_BIO_clear_retry_flags
	mov	x0, x19
	bl	_BIO_set_retry_write
LBB0_9:
	mov	w20, #-1
LBB0_10:
	mov	sp, x23
	ldur	x8, [x29, #-72]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x20
	sub	sp, x29, #64
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_IPPROTO_SCTP,8,3               ; @IPPROTO_SCTP
	.comm	_SCTP_SNDRCV,4,2                ; @SCTP_SNDRCV
	.comm	_SCTP_PRINFO,4,2                ; @SCTP_PRINFO
	.comm	_SCTP_SACK_IMMEDIATELY,4,2      ; @SCTP_SACK_IMMEDIATELY
	.comm	_SCTP_SNDINFO,4,2               ; @SCTP_SNDINFO
	.no_dead_strip	_dgram_sctp_write
.subsections_via_symbols
