	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rds_cmsg_rdma_dest             ## -- Begin function rds_cmsg_rdma_dest
	.p2align	4, 0x90
_rds_cmsg_rdma_dest:                    ## @rds_cmsg_rdma_dest
	.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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdx), %rbx
	movl	$4, %edi
	callq	_CMSG_LEN
	cmpq	%rax, %rbx
	jl	LBB0_2
## %bb.1:
	cmpq	$0, (%r15)
	je	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r12, %rdi
	callq	_CMSG_DATA
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$8, %edx
	callq	_memcpy
	movq	(%r15), %rdi
	callq	_rds_rdma_cookie_key
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	leaq	4(%r14), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_rds_mr_tree_walk
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movq	%rax, %rdi
	addq	$16, %rdi
	callq	_atomic_inc
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	8(%r12), %rax
	movl	(%r12), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	callq	*(%rax)
	movq	%r12, 8(%r15)
	jmp	LBB0_6
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rds_cmsg_rdma_dest             ; -- Begin function rds_cmsg_rdma_dest
	.p2align	2
_rds_cmsg_rdma_dest:                    ; @rds_cmsg_rdma_dest
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x2]
	mov	w0, #4
	bl	_CMSG_LEN
	cmp	x22, x0
	b.lt	LBB0_2
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_3:
	mov	x0, x22
	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
LBB0_4:
	mov	x0, x21
	bl	_CMSG_DATA
	mov	x1, x0
	mov	x0, x19
	mov	w2, #8
	bl	_memcpy
	ldr	x0, [x19]
	bl	_rds_rdma_cookie_key
	mov	x21, x0
	mov	x0, x20
	bl	_spin_lock_irqsave
	add	x0, x20, #4
	mov	x1, x21
	mov	x2, #0
	bl	_rds_mr_tree_walk
	cbz	x0, LBB0_6
; %bb.5:
	mov	x21, x0
	add	x0, x0, #16
	bl	_atomic_inc
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	ldr	w0, [x21]
Lloh3:
	adrp	x9, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	blr	x8
	mov	w22, #0
	str	x21, [x19, #8]
	b	LBB0_3
LBB0_6:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
.subsections_via_symbols
