	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_recvmsg                   ## -- Begin function sctp_recvmsg
	.p2align	4, 0x90
_sctp_recvmsg:                          ## @sctp_recvmsg
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, %r12
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %r15
	movl	%edi, -60(%rbp)                 ## 4-byte Spill
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SCTP_CONTROL_VEC_SIZE_RCV@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	testq	%r13, %r13
	je	LBB0_3
## %bb.1:
	movq	%r13, %rdx
	movq	%r15, -136(%rbp)
	movq	%r14, -144(%rbp)
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, -88(%rbp)
	testq	%r12, %r12
	je	LBB0_4
## %bb.2:
	movq	(%r12), %rcx
	jmp	LBB0_5
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %r15d
	jmp	LBB0_17
LBB0_4:
	xorl	%ecx, %ecx
LBB0_5:
	movq	%rcx, -96(%rbp)
	leaq	-144(%rbp), %rcx
	movq	%rcx, -104(%rbp)
	movl	$1, -128(%rbp)
	movq	%rax, -120(%rbp)
	movl	%ebx, -112(%rbp)
	movl	$0, -108(%rbp)
	movq	%rdx, %rbx
	movl	(%rdx), %edx
	leaq	-128(%rbp), %rsi
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_recvmsg
	movl	%eax, %r15d
	movl	-108(%rbp), %eax
	movl	%eax, (%rbx)
	testl	%r15d, %r15d
	jle	LBB0_17
## %bb.6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_17
## %bb.7:
	movq	$0, (%rax)
	cmpl	$0, -112(%rbp)
	jle	LBB0_17
## %bb.8:
	leaq	-128(%rbp), %rdi
	callq	_CMSG_FIRSTHDR
	testq	%rax, %rax
	je	LBB0_17
## %bb.9:
	movq	_IPPROTO_SCTP@GOTPCREL(%rip), %r14
	movq	_SCTP_SNDRCV@GOTPCREL(%rip), %r12
	movq	_SCTP_EXTRCV@GOTPCREL(%rip), %r13
	leaq	-128(%rbp), %rbx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_CMSG_NXTHDR
	testq	%rax, %rax
	je	LBB0_17
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rcx
	cmpq	(%r14), %rcx
	jne	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	8(%rax), %rcx
	cmpq	(%r12), %rcx
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	(%r13), %rcx
	jne	LBB0_10
## %bb.14:
	movq	%rax, %rdi
	callq	_CMSG_DATA
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	movl	$4, %edx
	jmp	LBB0_16
LBB0_15:
	movq	%rax, %rdi
	callq	_CMSG_DATA
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	movl	$8, %edx
LBB0_16:
	callq	_memcpy
LBB0_17:
	movq	-80(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SCTP_CONTROL_VEC_SIZE_RCV,4,2  ## @SCTP_CONTROL_VEC_SIZE_RCV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_IPPROTO_SCTP,8,3               ## @IPPROTO_SCTP
	.comm	_SCTP_SNDRCV,8,3                ## @SCTP_SNDRCV
	.comm	_SCTP_EXTRCV,8,3                ## @SCTP_EXTRCV
	.comm	_SYS_sctp_generic_recvmsg,4,2   ## @SYS_sctp_generic_recvmsg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_recvmsg                   ; -- Begin function sctp_recvmsg
	.p2align	2
_sctp_recvmsg:                          ; @sctp_recvmsg
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #80
	mov	x21, x6
	mov	x19, x5
	mov	x22, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _SCTP_CONTROL_VEC_SIZE_RCV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCTP_CONTROL_VEC_SIZE_RCV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x1fffffff0
	sub	x9, x9, x10
	mov	sp, x9
	cbz	x6, LBB0_3
; %bb.1:
	stp	x2, x1, [x29, #-120]
	stur	x3, [x29, #-64]
	cbz	x4, LBB0_4
; %bb.2:
	ldr	x10, [x4]
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _errno@GOTPAGE
Lloh12:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh13:
	str	w8, [x9]
	mov	w20, #-1
	b	LBB0_17
LBB0_4:
	mov	x10, #0
LBB0_5:
	sub	x11, x29, #120
	stp	x11, x10, [x29, #-80]
	mov	w10, #1
	stur	w10, [x29, #-104]
	stur	x9, [x29, #-96]
	stp	w8, wzr, [x29, #-88]
	ldr	w2, [x21]
	sub	x1, x29, #104
	bl	_recvmsg
	mov	x20, x0
	ldur	w8, [x29, #-84]
	str	w8, [x21]
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.6:
	cbz	x19, LBB0_17
; %bb.7:
	str	xzr, [x19]
	ldur	w8, [x29, #-88]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.8:
	sub	x0, x29, #104
	bl	_CMSG_FIRSTHDR
	cbz	x0, LBB0_17
; %bb.9:
	mov	x1, x0
Lloh14:
	adrp	x21, _IPPROTO_SCTP@GOTPAGE
Lloh15:
	ldr	x21, [x21, _IPPROTO_SCTP@GOTPAGEOFF]
Lloh16:
	adrp	x23, _SCTP_SNDRCV@GOTPAGE
Lloh17:
	ldr	x23, [x23, _SCTP_SNDRCV@GOTPAGEOFF]
Lloh18:
	adrp	x24, _SCTP_EXTRCV@GOTPAGE
Lloh19:
	ldr	x24, [x24, _SCTP_EXTRCV@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	sub	x0, x29, #104
	bl	_CMSG_NXTHDR
	mov	x1, x0
	cbz	x0, LBB0_17
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x1]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x1, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.14:
	mov	x0, x1
	bl	_CMSG_DATA
	mov	x1, x0
	mov	x0, x19
	mov	w2, #4
	b	LBB0_16
LBB0_15:
	mov	x0, x1
	bl	_CMSG_DATA
	mov	x1, x0
	mov	x0, x19
	mov	w2, #8
LBB0_16:
	bl	_memcpy
LBB0_17:
	mov	sp, x22
	ldur	x8, [x29, #-56]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	mov	x0, x20
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SCTP_CONTROL_VEC_SIZE_RCV,4,2  ; @SCTP_CONTROL_VEC_SIZE_RCV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_IPPROTO_SCTP,8,3               ; @IPPROTO_SCTP
	.comm	_SCTP_SNDRCV,8,3                ; @SCTP_SNDRCV
	.comm	_SCTP_EXTRCV,8,3                ; @SCTP_EXTRCV
	.comm	_SYS_sctp_generic_recvmsg,4,2   ; @SYS_sctp_generic_recvmsg
.subsections_via_symbols
