	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_connectx                  ## -- Begin function sctp_connectx
	.p2align	4, 0x90
_sctp_connectx:                         ## @sctp_connectx
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movl	%edx, %r15d
	testl	%edx, %edx
	jle	LBB0_2
## %bb.4:
	movq	%rcx, %r12
	movq	%rsi, %r14
	movl	%edi, %r13d
	leal	4(,%r15,4), %ebx
	movl	%ebx, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rbx
	movq	%rax, %r12
	addq	$4, %r12
	movl	%r15d, %r13d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	movslq	%r12d, %r12
	addq	$4, %r12
	movslq	4(%r14), %rax
	movslq	%r14d, %r14
	addq	%rax, %r14
	decl	%r13d
	je	LBB0_16
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$129, %eax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$4, 4(%r14)
	je	LBB0_14
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$4, 4(%r14)
	jne	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r14, %rdi
	callq	_IN6_IS_ADDR_V4MAPPED
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_in6_sin6_2_sin
	jmp	LBB0_15
LBB0_10:
	movq	%rbx, %rdi
	callq	_free
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_E2BIG@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%rbx, %r14
	movl	%r15d, (%rbx)
	movq	_IPPROTO_SCTP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SCTP_CONNECT_X@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rcx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_setsockopt
	movl	%eax, %ebx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_19
## %bb.17:
	testl	%ebx, %ebx
	jne	LBB0_19
## %bb.18:
	movl	(%r14), %eax
	movl	%eax, (%rcx)
LBB0_19:
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_E2BIG,4,2                      ## @E2BIG
	.comm	_IPPROTO_SCTP,4,2               ## @IPPROTO_SCTP
	.comm	_SCTP_CONNECT_X,4,2             ## @SCTP_CONNECT_X
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_connectx                  ; -- Begin function sctp_connectx
	.p2align	2
_sctp_connectx:                         ; @sctp_connectx
	.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
	cbz	x1, LBB0_13
; %bb.1:
	mov	x22, x2
	cmp	w2, #0
	b.le	LBB0_13
; %bb.2:
	mov	x19, x3
	mov	x24, x1
	mov	x21, x0
	lsl	w8, w22, #2
	add	w23, w8, #4
	mov	x0, x23
	bl	_malloc
	cbz	x0, LBB0_14
; %bb.3:
	mov	x20, x0
	add	x25, x0, #4
	mov	x26, x22
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
	mov	x1, x24
	mov	w2, #4
	bl	_memcpy
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	sxtw	x8, w25
	add	x25, x8, #4
	ldrsw	x8, [x24, #4]
	add	x24, x8, w24, sxtw
	subs	w26, w26, #1
	b.eq	LBB0_17
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w8, #129
	b.ne	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x24, #4]
	cmp	w8, #4
	b.eq	LBB0_4
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x24, #4]
	cmp	w8, #4
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x24
	bl	_IN6_IS_ADDR_V4MAPPED
	cbz	w0, LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
	mov	x1, x24
	bl	_in6_sin6_2_sin
	b	LBB0_5
LBB0_12:
	mov	x0, x20
	bl	_free
LBB0_13:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh2:
	adrp	x8, _E2BIG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
Lloh4:
	adrp	x9, _errno@GOTPAGE
Lloh5:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh6:
	str	w8, [x9]
	mov	w21, #-1
LBB0_16:
	mov	x0, x21
	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_17:
	str	w22, [x20]
Lloh7:
	adrp	x8, _IPPROTO_SCTP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IPPROTO_SCTP@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _SCTP_CONNECT_X@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SCTP_CONNECT_X@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x3, x20
	mov	x4, x23
	bl	_setsockopt
	mov	x21, x0
	cbz	x19, LBB0_20
; %bb.18:
	cbnz	w21, LBB0_20
; %bb.19:
	ldr	w8, [x20]
	str	w8, [x19]
LBB0_20:
	mov	x0, x20
	bl	_free
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_E2BIG,4,2                      ; @E2BIG
	.comm	_IPPROTO_SCTP,4,2               ; @IPPROTO_SCTP
	.comm	_SCTP_CONNECT_X,4,2             ; @SCTP_CONNECT_X
.subsections_via_symbols
