	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_sendx                     ## -- Begin function sctp_sendx
	.p2align	4, 0x90
_sctp_sendx:                            ## @sctp_sendx
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.1:
	movl	%r8d, %r12d
	testl	%r8d, %r8d
	jle	LBB0_5
## %bb.2:
	movq	%rcx, %r13
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	movq	_AF_INET6@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	leal	-1(%r12), %r14d
	leaq	8(,%r14,4), %r11
	shlq	$2, %r14
	movl	%r12d, %ecx
	movq	%r13, %rax
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	$4, %rax
	decl	%ecx
	je	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rbx
	cmpq	%r10, %rbx
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r8, %rbx
	je	LBB0_7
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %ebx
	movl	$-1, %r12d
LBB0_18:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
LBB0_19:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	%r11, %rdi
	movq	%r11, %rbx
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r15
	movl	%r12d, (%rax)
	movq	%rax, %rdi
	addq	$4, %rdi
	addq	$4, %r14
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	movq	_IPPROTO_SCTP@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_SCTP_CONNECT_X_DELAYED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %rcx
	movq	%rbx, %r8
	callq	_setsockopt
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_free
	testl	%r12d, %r12d
	je	LBB0_12
## %bb.11:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_EALREADY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_19
LBB0_12:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	jne	LBB0_14
## %bb.13:
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
LBB0_14:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	movq	%r13, %rsi
	callq	_sctp_getassocid
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movl	%r15d, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rbx, %rcx
	movl	16(%rbp), %r8d
	callq	_sctp_send
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	testl	%r12d, %r12d
	movl	%eax, %r12d
	jne	LBB0_18
## %bb.17:
	movl	(%r14), %esi
	movq	_SCTP_CONNECT_X_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%r13), %r8
	movl	%r15d, %edi
	movq	%r13, %rcx
	callq	_setsockopt
	jmp	LBB0_18
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_15:
	movl	(%r14), %esi
	movq	_SCTP_CONNECT_X_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%r13), %r8
	movl	%r15d, %edi
	movq	%r13, %rcx
	callq	_setsockopt
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_AF_INET6,8,3                   ## @AF_INET6
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IPPROTO_SCTP,4,2               ## @IPPROTO_SCTP
	.comm	_SCTP_CONNECT_X_DELAYED,4,2     ## @SCTP_CONNECT_X_DELAYED
	.comm	_EALREADY,4,2                   ## @EALREADY
	.comm	_SCTP_CONNECT_X_COMPLETE,4,2    ## @SCTP_CONNECT_X_COMPLETE
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_SYS_sctp_generic_sendmsg,4,2   ## @SYS_sctp_generic_sendmsg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_sendx                     ; -- Begin function sctp_sendx
	.p2align	2
_sctp_sendx:                            ; @sctp_sendx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x27, _errno@GOTPAGE
Lloh1:
	ldr	x27, [x27, _errno@GOTPAGEOFF]
	cbz	x3, LBB0_13
; %bb.1:
	mov	x25, x4
	subs	w10, w4, #1
	b.lt	LBB0_13
; %bb.2:
	mov	x21, x6
	mov	x22, x5
	mov	x19, x3
	mov	x23, x2
	mov	x24, x1
	mov	x20, x0
Lloh2:
	adrp	x8, _AF_INET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh4:
	adrp	x9, _AF_INET6@GOTPAGE
Lloh5:
	ldr	x9, [x9, _AF_INET6@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	ldr	x9, [x9]
	lsl	x28, x10, #2
	add	x26, x28, #8
	mov	x10, x25
	mov	x11, x3
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11]
	cmp	x12, x8
	ccmp	x12, x9, #4, ne
	b.ne	LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x11, x11, #4
	subs	w10, w10, #1
	b.ne	LBB0_3
; %bb.5:
	mov	x0, x26
	bl	_malloc
	cbz	x0, LBB0_17
; %bb.6:
	mov	x27, x0
	str	w25, [x0], #4
	add	x2, x28, #4
	mov	x1, x19
	bl	_memcpy
Lloh8:
	adrp	x28, _IPPROTO_SCTP@GOTPAGE
Lloh9:
	ldr	x28, [x28, _IPPROTO_SCTP@GOTPAGEOFF]
	ldr	w1, [x28]
Lloh10:
	adrp	x8, _SCTP_CONNECT_X_DELAYED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SCTP_CONNECT_X_DELAYED@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, x27
	mov	x4, x26
	bl	_setsockopt
	mov	x25, x0
	mov	x0, x27
	bl	_free
Lloh13:
	adrp	x27, _errno@GOTPAGE
Lloh14:
	ldr	x27, [x27, _errno@GOTPAGEOFF]
	cbz	w25, LBB0_8
; %bb.7:
	ldr	w8, [x27]
Lloh15:
	adrp	x9, _EALREADY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EALREADY@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_16
LBB0_8:
	cbnz	x22, LBB0_10
; %bb.9:
	add	x22, sp, #8
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	bl	_sctp_getassocid
	str	x0, [x22]
	cbz	x0, LBB0_18
; %bb.11:
	mov	x0, x20
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	bl	_sctp_send
	mov	x21, x0
	ldr	w22, [x27]
	cbnz	w25, LBB0_15
; %bb.12:
	ldr	w1, [x28]
Lloh18:
	adrp	x8, _SCTP_CONNECT_X_COMPLETE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SCTP_CONNECT_X_COMPLETE@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	ldr	x4, [x19, #8]
	mov	x0, x20
	mov	x3, x19
	bl	_setsockopt
	b	LBB0_15
LBB0_13:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_14:
	ldr	w22, [x8]
	mov	w21, #-1
LBB0_15:
	str	w22, [x27]
	mov	x25, x21
LBB0_16:
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_17:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w22, [x8]
	mov	w21, #-1
Lloh26:
	adrp	x27, _errno@GOTPAGE
Lloh27:
	ldr	x27, [x27, _errno@GOTPAGEOFF]
	b	LBB0_15
LBB0_18:
	ldr	w1, [x28]
Lloh28:
	adrp	x8, _SCTP_CONNECT_X_COMPLETE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SCTP_CONNECT_X_COMPLETE@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	ldr	x4, [x19, #8]
	mov	x0, x20
	mov	x3, x19
	bl	_setsockopt
Lloh31:
	adrp	x8, _ENOENT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_AF_INET6,8,3                   ; @AF_INET6
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IPPROTO_SCTP,4,2               ; @IPPROTO_SCTP
	.comm	_SCTP_CONNECT_X_DELAYED,4,2     ; @SCTP_CONNECT_X_DELAYED
	.comm	_EALREADY,4,2                   ; @EALREADY
	.comm	_SCTP_CONNECT_X_COMPLETE,4,2    ; @SCTP_CONNECT_X_COMPLETE
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_SYS_sctp_generic_sendmsg,4,2   ; @SYS_sctp_generic_sendmsg
.subsections_via_symbols
