	.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	%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
	movl	(%rsi), %eax
	movq	_T3_MAX_SGE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_3:
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_T3_RDMA_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rdi)
	movq	40(%rdi), %rax
	movq	$0, (%rax)
	movq	40(%rdi), %rax
	movq	$0, 8(%rax)
	movq	40(%rdi), %rax
	movq	$0, 16(%rax)
	movq	%rsi, %rdi
	callq	_rdma_wr
	movl	(%rax), %edi
	callq	_cpu_to_be32
	movq	%rax, 32(%r15)
	movq	%r12, %rdi
	callq	_rdma_wr
	movl	4(%rax), %edi
	callq	_cpu_to_be64
	movq	%rax, 24(%r15)
	movq	8(%r12), %rax
	movq	_IB_WR_RDMA_WRITE_WITH_IMM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.6:
	movq	24(%r12), %rax
	movq	16(%r15), %rcx
	movq	%rax, 16(%rcx)
	xorl	%edi, %edi
	callq	_cpu_to_be32
	movq	16(%r15), %rcx
	movq	%rax, 8(%rcx)
	xorl	%edi, %edi
	callq	_cpu_to_be32
	movq	%rax, 8(%r15)
	movl	$4, %r13d
	movl	$6, %eax
	jmp	LBB0_13
LBB0_4:
	movl	(%r12), %edi
	testl	%edi, %edi
	jle	LBB0_5
## %bb.7:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movl	(%rax,%rbx), %ecx
	testl	%ecx, %ecx
	js	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	addl	%ecx, %r13d
	movl	4(%rax,%rbx), %edi
	callq	_cpu_to_be32
	movq	16(%r15), %rcx
	movq	%rax, 16(%rcx,%rbx,2)
	movq	16(%r12), %rax
	movl	(%rax,%rbx), %edi
	callq	_cpu_to_be32
	movq	16(%r15), %rcx
	movq	%rax, 8(%rcx,%rbx,2)
	movq	16(%r12), %rax
	movl	8(%rax,%rbx), %edi
	callq	_cpu_to_be64
	movq	16(%r15), %rcx
	movq	%rax, (%rcx,%rbx,2)
	incq	%r14
	movslq	(%r12), %rdi
	addq	$12, %rbx
	cmpq	%rdi, %r14
	jl	LBB0_8
## %bb.11:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_5:
	xorl	%r13d, %r13d
LBB0_12:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_be32
	movq	%rax, 8(%r15)
	movl	(%r12), %eax
	addl	%eax, %eax
	addl	$5, %eax
LBB0_13:
	movl	%eax, (%rbx)
	movl	%r13d, %edi
	callq	_cpu_to_be32
	movq	%rax, (%r15)
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_T3_MAX_SGE,4,2                 ## @T3_MAX_SGE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_T3_RDMA_WRITE,4,2              ## @T3_RDMA_WRITE
	.comm	_IB_WR_RDMA_WRITE_WITH_IMM,8,3  ## @IB_WR_RDMA_WRITE_WITH_IMM
	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
	.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:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _T3_MAX_SGE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _T3_MAX_SGE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_3:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh5:
	adrp	x8, _T3_RDMA_WRITE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _T3_RDMA_WRITE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x0, #48]
	ldr	x8, [x0, #40]
	str	xzr, [x8]
	ldr	x8, [x0, #40]
	str	xzr, [x8, #8]
	ldr	x8, [x0, #40]
	str	xzr, [x8, #16]
	mov	x0, x1
	bl	_rdma_wr
	ldr	w0, [x0]
	bl	_cpu_to_be32
	str	x0, [x19, #32]
	mov	x0, x21
	bl	_rdma_wr
	ldr	w0, [x0, #4]
	bl	_cpu_to_be64
	str	x0, [x19, #24]
	ldr	x8, [x21, #8]
Lloh8:
	adrp	x9, _IB_WR_RDMA_WRITE_WITH_IMM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IB_WR_RDMA_WRITE_WITH_IMM@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x21, #24]
	ldr	x9, [x19, #16]
	str	x8, [x9, #16]
	mov	w0, #0
	bl	_cpu_to_be32
	ldr	x8, [x19, #16]
	str	x0, [x8, #8]
	mov	w0, #0
	bl	_cpu_to_be32
	str	x0, [x19, #8]
	mov	w22, #4
	mov	w8, #6
	b	LBB0_11
LBB0_5:
	ldr	w0, [x21]
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x23, #0
	mov	x24, #0
	mov	x25, #0
	mov	w22, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #16]
	ldr	w9, [x8, x24]
	tbnz	w9, #31, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w22, w9, w22
	add	x8, x8, x24
	ldr	w0, [x8, #4]
	bl	_cpu_to_be32
	ldr	x8, [x19, #16]
	add	x8, x8, x23
	str	x0, [x8, #16]
	ldr	x8, [x21, #16]
	ldr	w0, [x8, x24]
	bl	_cpu_to_be32
	ldr	x8, [x19, #16]
	add	x8, x8, x23
	str	x0, [x8, #8]
	ldr	x8, [x21, #16]
	add	x8, x8, x24
	ldr	w0, [x8, #8]
	bl	_cpu_to_be64
	ldr	x8, [x19, #16]
	str	x0, [x8, x23]
	add	x25, x25, #1
	ldrsw	x0, [x21]
	add	x24, x24, #12
	add	x23, x23, #24
	cmp	x25, x0
	b.lt	LBB0_7
	b	LBB0_10
LBB0_9:
	mov	w22, #0
LBB0_10:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_cpu_to_be32
	str	x0, [x19, #8]
	ldr	w8, [x21]
	lsl	w8, w8, #1
	add	w8, w8, #5
LBB0_11:
	str	w8, [x20]
	mov	x0, x22
	bl	_cpu_to_be32
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19]
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh11:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_T3_MAX_SGE,4,2                 ; @T3_MAX_SGE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_T3_RDMA_WRITE,4,2              ; @T3_RDMA_WRITE
	.comm	_IB_WR_RDMA_WRITE_WITH_IMM,8,3  ; @IB_WR_RDMA_WRITE_WITH_IMM
	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
	.no_dead_strip	_build_rdma_write
.subsections_via_symbols
