	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rose_recvmsg
_rose_recvmsg:                          ## @rose_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	(%rsi), %r15
	movq	%r15, %rdi
	callq	_rose_sk
	movq	%rax, %r14
	movq	(%r15), %rax
	movq	_TCP_ESTABLISHED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	$0, (%r13)
	movq	_MSG_DONTWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %esi
	notl	%esi
	andl	%ebx, %esi
	andl	%ebx, %edx
	leaq	-60(%rbp), %rcx
	movq	%r15, %rdi
	callq	_skb_recv_datagram
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movl	(%rax), %ebx
	movq	_ROSE_Q_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_ROSE_MIN_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_skb_pull
	cmpq	$0, 24(%r14)
	je	LBB0_6
## %bb.5:
	notl	%ebx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_skb_push
	testl	%ebx, %r13d
	sete	(%rax)
LBB0_6:
	movq	%r12, %rdi
	callq	_skb_reset_transport_header
	movq	8(%r12), %r13
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, %r13
	jbe	LBB0_8
## %bb.7:
	movq	_MSG_TRUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, 20(%rcx)
	movq	%rdx, %r13
LBB0_8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	16(%rbx), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%r13, %rcx
	callq	_skb_copy_datagram_iovec
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.9:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	8(%rbx), %rax
	movq	_AF_ROSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax)
	movl	20(%r14), %ecx
	movl	%ecx, 8(%rax)
	movl	16(%r14), %ecx
	movl	%ecx, 4(%rax)
	movl	(%r14), %ecx
	movl	%ecx, (%rax)
	testl	%ecx, %ecx
	jle	LBB0_12
## %bb.10:
	movq	8(%r14), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rdx,4), %esi
	movl	%esi, (%rcx,%rdx,4)
	incq	%rdx
	movslq	(%r14), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_11
LBB0_12:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$8, (%rax)
LBB0_13:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_skb_free_datagram
	jmp	LBB0_14
LBB0_1:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_14
LBB0_3:
	movl	-60(%rbp), %r13d
LBB0_14:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TCP_ESTABLISHED,8,3            ## @TCP_ESTABLISHED
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.comm	_MSG_DONTWAIT,4,2               ## @MSG_DONTWAIT
	.comm	_ROSE_Q_BIT,4,2                 ## @ROSE_Q_BIT
	.comm	_ROSE_MIN_LEN,4,2               ## @ROSE_MIN_LEN
	.comm	_MSG_TRUNC,4,2                  ## @MSG_TRUNC
	.comm	_AF_ROSE,4,2                    ## @AF_ROSE
	.no_dead_strip	_rose_recvmsg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rose_recvmsg
_rose_recvmsg:                          ; @rose_recvmsg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x22, x4
	mov	x24, x3
	mov	x20, x2
	ldr	x19, [x1]
	mov	x0, x19
	bl	_rose_sk
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _TCP_ESTABLISHED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TCP_ESTABLISHED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.1:
	mov	x21, x0
	str	wzr, [x20]
Lloh3:
	adrp	x8, _MSG_DONTWAIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_DONTWAIT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	bic	w1, w22, w8
	and	w2, w8, w22
	add	x3, sp, #12
	mov	x0, x19
	bl	_skb_recv_datagram
	cbz	x0, LBB0_13
; %bb.2:
	mov	x22, x0
	ldr	x8, [x0]
	ldr	w23, [x8]
Lloh6:
	adrp	x8, _ROSE_Q_BIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ROSE_Q_BIT@GOTPAGEOFF]
Lloh8:
	ldr	w25, [x8]
Lloh9:
	adrp	x8, _ROSE_MIN_LEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ROSE_MIN_LEN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_skb_pull
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_4
; %bb.3:
	bics	wzr, w25, w23
	cset	w23, eq
	mov	x0, x22
	mov	w1, #1
	bl	_skb_push
	strb	w23, [x0]
LBB0_4:
	mov	x0, x22
	bl	_skb_reset_transport_header
	ldr	x23, [x22, #8]
	cmp	x23, x24
	b.ls	LBB0_6
; %bb.5:
Lloh12:
	adrp	x8, _MSG_TRUNC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSG_TRUNC@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x20, #20]
	orr	w8, w9, w8
	str	w8, [x20, #20]
	mov	x23, x24
LBB0_6:
	ldr	w2, [x20, #16]
	mov	x0, x22
	mov	w1, #0
	mov	x3, x23
	bl	_skb_copy_datagram_iovec
	ldr	x24, [x20, #8]
	cbz	x24, LBB0_11
; %bb.7:
	mov	w25, #8
	mov	x0, x24
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x20, #8]
Lloh15:
	adrp	x9, _AF_ROSE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AF_ROSE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	str	w9, [x8, #12]
	ldr	d0, [x21, #16]
	stur	d0, [x8, #4]
	ldr	w9, [x21]
	str	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x8, #0
	ldr	x9, [x21, #8]
	ldr	x10, [x24]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x11, x8, #2
	ldr	w12, [x9, x11]
	str	w12, [x10, x11]
	add	x8, x8, #1
	ldrsw	x11, [x21]
	cmp	x8, x11
	b.lt	LBB0_9
LBB0_10:
	str	w25, [x20]
LBB0_11:
	mov	x0, x19
	mov	x1, x22
	bl	_skb_free_datagram
	b	LBB0_14
LBB0_12:
Lloh18:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_14
LBB0_13:
	ldr	w23, [sp, #12]
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_TCP_ESTABLISHED,8,3            ; @TCP_ESTABLISHED
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.comm	_MSG_DONTWAIT,4,2               ; @MSG_DONTWAIT
	.comm	_ROSE_Q_BIT,4,2                 ; @ROSE_Q_BIT
	.comm	_ROSE_MIN_LEN,4,2               ; @ROSE_MIN_LEN
	.comm	_MSG_TRUNC,4,2                  ; @MSG_TRUNC
	.comm	_AF_ROSE,4,2                    ; @AF_ROSE
	.no_dead_strip	_rose_recvmsg
.subsections_via_symbols
