	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qedr_prepare_reg
_qedr_prepare_reg:                      ## @qedr_prepare_reg
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	8(%rdx), %edi
	callq	_get_qedr_mr
	movq	%rax, %r15
	leaq	8(%r14), %rdi
	callq	_qed_chain_produce
	movq	%rax, %r13
	movl	16(%r15), %edi
	callq	_upper_32_bits
	movq	%rax, 16(%rbx)
	movl	16(%r15), %edi
	callq	_lower_32_bits
	movq	%rax, 8(%rbx)
	movl	4(%r12), %eax
	movl	%eax, (%rbx)
	movq	$0, 40(%r13)
	movq	_RDMA_SQ_FMR_WQE_2ND_REMOTE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IB_ACCESS_REMOTE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	andl	(%r12), %eax
	setne	%dl
	xorl	%edi, %edi
	callq	_SET_FIELD2
	movq	40(%r13), %rdi
	movq	_RDMA_SQ_FMR_WQE_2ND_REMOTE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IB_ACCESS_REMOTE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	andl	(%r12), %eax
	setne	%dl
	callq	_SET_FIELD2
	movq	40(%r13), %rdi
	movq	_RDMA_SQ_FMR_WQE_2ND_ENABLE_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IB_ACCESS_REMOTE_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	andl	(%r12), %eax
	setne	%dl
	callq	_SET_FIELD2
	movq	40(%r13), %rdi
	movq	_RDMA_SQ_FMR_WQE_2ND_LOCAL_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_SET_FIELD2
	movq	40(%r13), %rdi
	movq	_RDMA_SQ_FMR_WQE_2ND_LOCAL_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IB_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	andl	(%r12), %eax
	setne	%dl
	callq	_SET_FIELD2
	movq	$0, 32(%r13)
	movq	_RDMA_SQ_FMR_WQE_2ND_PAGE_SIZE_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	12(%r15), %edi
	callq	_ilog2
                                        ## kill: def $eax killed $eax def $rax
	leal	-12(%rax), %edx
	xorl	%edi, %edi
	movl	%ebx, %esi
	callq	_SET_FIELD2
	movq	$0, 24(%r13)
	movl	8(%r15), %eax
	movl	%eax, 16(%r13)
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_upper_32_bits
	movq	%rax, 8(%r13)
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_lower_32_bits
	movq	%rax, (%r13)
	movq	(%r14), %rax
	movq	16(%r14), %rcx
	movq	%r15, (%rcx,%rax,8)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RDMA_SQ_FMR_WQE_2ND_REMOTE_READ,4,2 ## @RDMA_SQ_FMR_WQE_2ND_REMOTE_READ
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ## @IB_ACCESS_REMOTE_READ
	.comm	_RDMA_SQ_FMR_WQE_2ND_REMOTE_WRITE,4,2 ## @RDMA_SQ_FMR_WQE_2ND_REMOTE_WRITE
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ## @IB_ACCESS_REMOTE_WRITE
	.comm	_RDMA_SQ_FMR_WQE_2ND_ENABLE_ATOMIC,4,2 ## @RDMA_SQ_FMR_WQE_2ND_ENABLE_ATOMIC
	.comm	_IB_ACCESS_REMOTE_ATOMIC,4,2    ## @IB_ACCESS_REMOTE_ATOMIC
	.comm	_RDMA_SQ_FMR_WQE_2ND_LOCAL_READ,4,2 ## @RDMA_SQ_FMR_WQE_2ND_LOCAL_READ
	.comm	_RDMA_SQ_FMR_WQE_2ND_LOCAL_WRITE,4,2 ## @RDMA_SQ_FMR_WQE_2ND_LOCAL_WRITE
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ## @IB_ACCESS_LOCAL_WRITE
	.comm	_RDMA_SQ_FMR_WQE_2ND_PAGE_SIZE_LOG,4,2 ## @RDMA_SQ_FMR_WQE_2ND_PAGE_SIZE_LOG
	.no_dead_strip	_qedr_prepare_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qedr_prepare_reg
_qedr_prepare_reg:                      ; @qedr_prepare_reg
	.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
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	w0, [x2, #8]
	bl	_get_qedr_mr
	mov	x20, x0
	add	x0, x19, #8
	bl	_qed_chain_produce
	mov	x21, x0
	ldr	w0, [x20, #16]
	bl	_upper_32_bits
	str	x0, [x23, #16]
	ldr	w0, [x20, #16]
	bl	_lower_32_bits
	str	x0, [x23, #8]
	ldp	w9, w8, [x22]
	str	w8, [x23]
	str	xzr, [x21, #40]
Lloh0:
	adrp	x8, _RDMA_SQ_FMR_WQE_2ND_REMOTE_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RDMA_SQ_FMR_WQE_2ND_REMOTE_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _IB_ACCESS_REMOTE_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_ACCESS_REMOTE_READ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w9
	cset	w2, ne
	mov	x0, #0
	bl	_SET_FIELD2
	ldr	x0, [x21, #40]
Lloh6:
	adrp	x8, _RDMA_SQ_FMR_WQE_2ND_REMOTE_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RDMA_SQ_FMR_WQE_2ND_REMOTE_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w8, [x22]
Lloh9:
	adrp	x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w2, ne
	bl	_SET_FIELD2
	ldr	x0, [x21, #40]
Lloh12:
	adrp	x8, _RDMA_SQ_FMR_WQE_2ND_ENABLE_ATOMIC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RDMA_SQ_FMR_WQE_2ND_ENABLE_ATOMIC@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w8, [x22]
Lloh15:
	adrp	x9, _IB_ACCESS_REMOTE_ATOMIC@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_ATOMIC@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w2, ne
	bl	_SET_FIELD2
	ldr	x0, [x21, #40]
Lloh18:
	adrp	x8, _RDMA_SQ_FMR_WQE_2ND_LOCAL_READ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RDMA_SQ_FMR_WQE_2ND_LOCAL_READ@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_SET_FIELD2
	ldr	x0, [x21, #40]
Lloh21:
	adrp	x8, _RDMA_SQ_FMR_WQE_2ND_LOCAL_WRITE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RDMA_SQ_FMR_WQE_2ND_LOCAL_WRITE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldr	w8, [x22]
Lloh24:
	adrp	x9, _IB_ACCESS_LOCAL_WRITE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _IB_ACCESS_LOCAL_WRITE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w2, ne
	bl	_SET_FIELD2
	str	xzr, [x21, #32]
Lloh27:
	adrp	x8, _RDMA_SQ_FMR_WQE_2ND_PAGE_SIZE_LOG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _RDMA_SQ_FMR_WQE_2ND_PAGE_SIZE_LOG@GOTPAGEOFF]
Lloh29:
	ldr	w22, [x8]
	ldr	w0, [x20, #12]
	bl	_ilog2
	sub	w2, w0, #12
	mov	x0, #0
	mov	x1, x22
	bl	_SET_FIELD2
	str	xzr, [x21, #24]
	ldr	w8, [x20, #8]
	str	w8, [x21, #16]
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_upper_32_bits
	str	x0, [x21, #8]
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_lower_32_bits
	str	x0, [x21]
	ldr	x8, [x19, #16]
	ldr	x9, [x19]
	str	x20, [x8, x9, lsl #3]
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RDMA_SQ_FMR_WQE_2ND_REMOTE_READ,4,2 ; @RDMA_SQ_FMR_WQE_2ND_REMOTE_READ
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ; @IB_ACCESS_REMOTE_READ
	.comm	_RDMA_SQ_FMR_WQE_2ND_REMOTE_WRITE,4,2 ; @RDMA_SQ_FMR_WQE_2ND_REMOTE_WRITE
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ; @IB_ACCESS_REMOTE_WRITE
	.comm	_RDMA_SQ_FMR_WQE_2ND_ENABLE_ATOMIC,4,2 ; @RDMA_SQ_FMR_WQE_2ND_ENABLE_ATOMIC
	.comm	_IB_ACCESS_REMOTE_ATOMIC,4,2    ; @IB_ACCESS_REMOTE_ATOMIC
	.comm	_RDMA_SQ_FMR_WQE_2ND_LOCAL_READ,4,2 ; @RDMA_SQ_FMR_WQE_2ND_LOCAL_READ
	.comm	_RDMA_SQ_FMR_WQE_2ND_LOCAL_WRITE,4,2 ; @RDMA_SQ_FMR_WQE_2ND_LOCAL_WRITE
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ; @IB_ACCESS_LOCAL_WRITE
	.comm	_RDMA_SQ_FMR_WQE_2ND_PAGE_SIZE_LOG,4,2 ; @RDMA_SQ_FMR_WQE_2ND_PAGE_SIZE_LOG
	.no_dead_strip	_qedr_prepare_reg
.subsections_via_symbols
