	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_do_peeloff                ## -- Begin function sctp_do_peeloff
	.p2align	4, 0x90
_sctp_do_peeloff:                       ## @sctp_do_peeloff
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	movq	%rbx, %rdi
	movl	%edx, %esi
	movl	$1, %edx
	callq	_sctp_findassociation_ep_asocid
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_SCTP_GET_STATE
	movq	_SCTP_STATE_EMPTY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	_SCTP_STATE_INUSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.7:
	movq	(%r12), %r15
	movq	_SCTP_PCB_FLAGS_UDPTYPE@GOTPCREL(%rip), %rax
	movq	_SCTP_PCB_FLAGS_CONNECTED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SCTP_PCB_FLAGS_IN_TCPPOOL@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_SCTP_PCB_COPY_FLAGS@GOTPCREL(%rip), %rax
	movl	(%rbx), %edx
	andl	(%rax), %edx
	orl	%ecx, %edx
	movl	%edx, (%r15)
	movq	%r12, 104(%r15)
	movl	96(%rbx), %eax
	movl	%eax, 96(%r15)
	movl	92(%rbx), %eax
	movl	%eax, 92(%r15)
	movl	88(%rbx), %eax
	movl	%eax, 88(%r15)
	movups	72(%rbx), %xmm0
	movups	%xmm0, 72(%r15)
	movups	56(%rbx), %xmm0
	movups	%xmm0, 56(%r15)
	movups	40(%rbx), %xmm0
	movups	%xmm0, 40(%r15)
	movq	$0, 32(%r15)
	movq	24(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_sctp_free_hmaclist
LBB0_9:
	movq	24(%rbx), %rdi
	callq	_sctp_copy_hmaclist
	movq	%rax, 24(%r15)
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:
	callq	_sctp_free_chunklist
LBB0_11:
	leaq	8(%rbx), %r12
	movq	16(%rbx), %rdi
	callq	_sctp_copy_chunklist
	movq	%rax, 16(%r15)
	leaq	8(%r15), %rsi
	movq	%r12, %rdi
	callq	_sctp_copy_skeylist
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_sctp_move_pcb_and_assoc
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_atomic_add_int
	movq	%r14, %rdi
	callq	_SCTP_TCB_UNLOCK
	movq	_SBL_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_sctp_pull_off_control_to_new_inp
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_atomic_subtract_int
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_1:
	movq	_SCTP_FROM_SCTP_PEELOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_EFAULT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r8d
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_SCTP_LTRACE_ERR_RET
	movl	(%rbx), %eax
	jmp	LBB0_12
LBB0_6:
	movq	%r14, %rdi
	callq	_SCTP_TCB_UNLOCK
LBB0_3:
	movq	_SCTP_FROM_SCTP_PEELOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ENOTCONN@GOTPCREL(%rip), %r14
	movl	(%r14), %r8d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_SCTP_LTRACE_ERR_RET
	movl	(%r14), %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCTP_FROM_SCTP_PEELOFF,4,2     ## @SCTP_FROM_SCTP_PEELOFF
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.comm	_SCTP_STATE_EMPTY,8,3           ## @SCTP_STATE_EMPTY
	.comm	_SCTP_STATE_INUSE,8,3           ## @SCTP_STATE_INUSE
	.comm	_SCTP_PCB_FLAGS_UDPTYPE,4,2     ## @SCTP_PCB_FLAGS_UDPTYPE
	.comm	_SCTP_PCB_FLAGS_CONNECTED,4,2   ## @SCTP_PCB_FLAGS_CONNECTED
	.comm	_SCTP_PCB_FLAGS_IN_TCPPOOL,4,2  ## @SCTP_PCB_FLAGS_IN_TCPPOOL
	.comm	_SCTP_PCB_COPY_FLAGS,4,2        ## @SCTP_PCB_COPY_FLAGS
	.comm	_SBL_WAIT,4,2                   ## @SBL_WAIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_do_peeloff                ; -- Begin function sctp_do_peeloff
	.p2align	2
_sctp_do_peeloff:                       ; @sctp_do_peeloff
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x19, [x0]
	cbz	x19, LBB0_5
; %bb.1:
	mov	x22, x1
	mov	x0, x19
	mov	x1, x2
	mov	w2, #1
	bl	_sctp_findassociation_ep_asocid
	cbz	x0, LBB0_4
; %bb.2:
	mov	x20, x0
	bl	_SCTP_GET_STATE
Lloh0:
	adrp	x8, _SCTP_STATE_EMPTY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCTP_STATE_EMPTY@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _SCTP_STATE_INUSE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SCTP_STATE_INUSE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #4, ne
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_SCTP_TCB_UNLOCK
LBB0_4:
Lloh6:
	adrp	x8, _SCTP_FROM_SCTP_PEELOFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SCTP_FROM_SCTP_PEELOFF@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
Lloh9:
	adrp	x20, _ENOTCONN@GOTPAGE
Lloh10:
	ldr	x20, [x20, _ENOTCONN@GOTPAGEOFF]
	ldr	w4, [x20]
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	bl	_SCTP_LTRACE_ERR_RET
	ldr	w0, [x20]
	b	LBB0_11
LBB0_5:
Lloh11:
	adrp	x8, _SCTP_FROM_SCTP_PEELOFF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SCTP_FROM_SCTP_PEELOFF@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
Lloh14:
	adrp	x19, _EFAULT@GOTPAGE
Lloh15:
	ldr	x19, [x19, _EFAULT@GOTPAGEOFF]
	ldr	w4, [x19]
	mov	x0, #0
	mov	x1, #0
	mov	x2, #0
	bl	_SCTP_LTRACE_ERR_RET
	ldr	w0, [x19]
	b	LBB0_11
LBB0_6:
Lloh16:
	adrp	x8, _SCTP_PCB_FLAGS_UDPTYPE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SCTP_PCB_FLAGS_UDPTYPE@GOTPAGEOFF]
	ldr	x21, [x22]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _SCTP_PCB_FLAGS_CONNECTED@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SCTP_PCB_FLAGS_CONNECTED@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh22:
	adrp	x9, _SCTP_PCB_FLAGS_IN_TCPPOOL@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SCTP_PCB_FLAGS_IN_TCPPOOL@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh25:
	adrp	x9, _SCTP_PCB_COPY_FLAGS@GOTPAGE
Lloh26:
	ldr	x9, [x9, _SCTP_PCB_COPY_FLAGS@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	ldr	w10, [x19]
	and	w9, w10, w9
	orr	w8, w8, w9
	str	w8, [x21]
	str	x22, [x21, #104]
	ldr	w8, [x19, #96]
	str	w8, [x21, #96]
	ldr	d0, [x19, #88]
	str	d0, [x21, #88]
	ldur	q0, [x19, #72]
	stur	q0, [x21, #72]
	ldur	q0, [x19, #56]
	stur	q0, [x21, #56]
	ldur	q0, [x19, #40]
	stur	q0, [x21, #40]
	str	xzr, [x21, #32]
	ldr	x0, [x21, #24]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_sctp_free_hmaclist
LBB0_8:
	ldr	x0, [x19, #24]
	bl	_sctp_copy_hmaclist
	str	x0, [x21, #24]
	ldr	x0, [x21, #16]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_sctp_free_chunklist
LBB0_10:
	add	x22, x19, #8
	ldr	x0, [x19, #16]
	bl	_sctp_copy_chunklist
	str	x0, [x21, #16]
	add	x1, x21, #8
	mov	x0, x22
	bl	_sctp_copy_skeylist
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_sctp_move_pcb_and_assoc
	mov	x0, x20
	mov	w1, #1
	bl	_atomic_add_int
	mov	x0, x20
	bl	_SCTP_TCB_UNLOCK
Lloh28:
	adrp	x8, _SBL_WAIT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SBL_WAIT@GOTPAGEOFF]
Lloh30:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_sctp_pull_off_control_to_new_inp
	mov	x0, x20
	mov	w1, #1
	bl	_atomic_subtract_int
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_SCTP_FROM_SCTP_PEELOFF,4,2     ; @SCTP_FROM_SCTP_PEELOFF
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.comm	_SCTP_STATE_EMPTY,8,3           ; @SCTP_STATE_EMPTY
	.comm	_SCTP_STATE_INUSE,8,3           ; @SCTP_STATE_INUSE
	.comm	_SCTP_PCB_FLAGS_UDPTYPE,4,2     ; @SCTP_PCB_FLAGS_UDPTYPE
	.comm	_SCTP_PCB_FLAGS_CONNECTED,4,2   ; @SCTP_PCB_FLAGS_CONNECTED
	.comm	_SCTP_PCB_FLAGS_IN_TCPPOOL,4,2  ; @SCTP_PCB_FLAGS_IN_TCPPOOL
	.comm	_SCTP_PCB_COPY_FLAGS,4,2        ; @SCTP_PCB_COPY_FLAGS
	.comm	_SBL_WAIT,4,2                   ; @SBL_WAIT
.subsections_via_symbols
