	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function build_rdma_write
_build_rdma_write:                      ## @build_rdma_write
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	(%rdx), %eax
	movq	_T4_MAX_SEND_SGE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_2:
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	$0, 40(%rsi)
	movl	12(%rdx), %edi
	callq	_htobe32
	movq	%rax, 32(%r15)
	movl	16(%rbx), %edi
	callq	_htobe64
	movl	%eax, 24(%r15)
	movl	(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_8
## %bb.3:
	movq	_IBV_SEND_INLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_6
## %bb.4:
	movq	8(%r15), %rsi
	movq	_T4_MAX_WRITE_INLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-36(%rbp), %r8
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_build_immd
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movl	-36(%rbp), %edi
	addl	$52, %edi
	jmp	LBB0_9
LBB0_8:
	movq	_FW_RI_DATA_IMMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r15), %rcx
	movl	%eax, 24(%rcx)
	movq	8(%r15), %rax
	movq	$0, 16(%rax)
	movq	8(%r15), %rax
	movq	$0, 8(%rax)
	movq	8(%r15), %rax
	movq	$0, (%rax)
	movl	$0, -36(%rbp)
	movl	$52, %edi
	jmp	LBB0_9
LBB0_6:
	movl	16(%r15), %edi
	movl	8(%rbx), %esi
	leaq	-36(%rbp), %rcx
	callq	_build_isgl
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movl	(%rbx), %eax
	leal	52(,%rax,4), %edi
LBB0_9:
	movl	$16, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, (%r14)
	movl	-36(%rbp), %edi
	callq	_htobe32
	movq	%rax, (%r15)
	xorl	%eax, %eax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_T4_MAX_SEND_SGE,4,2            ## @T4_MAX_SEND_SGE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IBV_SEND_INLINE,4,2            ## @IBV_SEND_INLINE
	.comm	_T4_MAX_WRITE_INLINE,4,2        ## @T4_MAX_WRITE_INLINE
	.comm	_FW_RI_DATA_IMMD,4,2            ## @FW_RI_DATA_IMMD
	.no_dead_strip	_build_rdma_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function build_rdma_write
_build_rdma_write:                      ; @build_rdma_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	w8, [x2]
Lloh0:
	adrp	x9, _T4_MAX_SEND_SGE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _T4_MAX_SEND_SGE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_2:
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	str	xzr, [x1, #40]
	ldr	w0, [x2, #12]
	bl	_htobe32
	str	x0, [x19, #32]
	ldr	w0, [x21, #16]
	bl	_htobe64
	str	w0, [x19, #24]
	ldr	w2, [x21]
	cbz	w2, LBB0_6
; %bb.3:
	ldr	w8, [x21, #4]
Lloh6:
	adrp	x9, _IBV_SEND_INLINE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IBV_SEND_INLINE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	ldr	x1, [x19, #8]
Lloh9:
	adrp	x8, _T4_MAX_WRITE_INLINE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _T4_MAX_WRITE_INLINE@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	add	x4, sp, #12
	mov	x0, x22
	mov	x2, x21
	bl	_build_immd
	cbnz	w0, LBB0_11
; %bb.5:
	ldr	w8, [sp, #12]
	b	LBB0_9
LBB0_6:
Lloh12:
	adrp	x8, _FW_RI_DATA_IMMD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FW_RI_DATA_IMMD@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9, #24]
	ldr	x8, [x19, #8]
	str	xzr, [x8, #16]
	ldr	x8, [x19, #8]
	str	xzr, [x8, #8]
	ldr	x8, [x19, #8]
	str	xzr, [x8]
	str	wzr, [sp, #12]
	mov	w0, #52
	b	LBB0_10
LBB0_7:
	ldr	w0, [x19, #16]
	ldr	w1, [x21, #8]
	add	x3, sp, #12
	bl	_build_isgl
	cbnz	w0, LBB0_11
; %bb.8:
	ldr	w8, [x21]
	lsl	w8, w8, #2
LBB0_9:
	add	w0, w8, #52
LBB0_10:
	mov	w1, #16
	bl	_DIV_ROUND_UP
	str	w0, [x20]
	ldr	w0, [sp, #12]
	bl	_htobe32
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19]
LBB0_11:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_T4_MAX_SEND_SGE,4,2            ; @T4_MAX_SEND_SGE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IBV_SEND_INLINE,4,2            ; @IBV_SEND_INLINE
	.comm	_T4_MAX_WRITE_INLINE,4,2        ; @T4_MAX_WRITE_INLINE
	.comm	_FW_RI_DATA_IMMD,4,2            ; @FW_RI_DATA_IMMD
	.no_dead_strip	_build_rdma_write
.subsections_via_symbols
