	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs_init_bufs
_rs_init_bufs:                          ## @rs_init_bufs
	.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	%rdi, %r12
	movslq	(%rdi), %rdi
	incq	%rdi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, 168(%r12)
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	_RS_MAX_CTRL_MSG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_RS_QP_CTRL_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	%eax, %ecx
	xorl	%edx, %edx
	cmpl	%eax, 16(%r12)
	cmovll	%ecx, %edx
	movslq	%edx, %rbx
	addq	8(%r12), %rbx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, 104(%r12)
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movl	128(%r12), %edi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	callq	_rdma_reg_msgs
	movq	%rax, 88(%r12)
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	movq	_RS_SGL_SIZE@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rax
	movslq	20(%r12), %rcx
	leaq	(%rax,%rcx,4), %r15
	movq	%r15, %rdi
	callq	_malloc
	movq	%rax, 152(%r12)
	testq	%rax, %rax
	je	LBB0_13
## %bb.4:
	movl	128(%r12), %edi
	movq	%rax, %rsi
	movq	%r15, %rdx
	callq	_rdma_reg_write
	movq	%rax, 160(%r12)
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movq	152(%r12), %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_memset
	movq	152(%r12), %rax
	movq	%rax, 136(%r12)
	cmpl	$0, 20(%r12)
	je	LBB0_7
## %bb.6:
	movslq	(%rbx), %rcx
	addq	%rcx, %rax
	movq	%rax, 144(%r12)
LBB0_7:
	movq	24(%r12), %r15
	movq	_RS_OPT_MSG_SEND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 32(%r12)
	je	LBB0_9
## %bb.8:
	movslq	(%r12), %rax
	movq	_RS_MSG_SIZE@GOTPCREL(%rip), %rcx
	imulq	(%rcx), %rax
	addq	%rax, %r15
LBB0_9:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, 120(%r12)
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movl	128(%r12), %edi
	movq	%rax, %rsi
	movq	%r15, %rdx
	callq	_rdma_reg_write
	movq	%rax, 112(%r12)
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	96(%r12), %rax
	movq	104(%r12), %rcx
	movq	%rcx, 16(%rax)
	movq	%rcx, (%rax)
	movq	8(%r12), %rcx
	movq	88(%r12), %rdx
	movq	%rcx, 40(%r12)
	movl	(%rdx), %ecx
	movl	%ecx, 24(%rax)
	movl	%ecx, 8(%rax)
	movq	24(%r12), %rax
	shrq	%rax
	movl	%eax, 48(%r12)
	movl	%eax, 52(%r12)
	movq	72(%r12), %rax
	subq	64(%r12), %rax
	movq	%rax, 80(%r12)
	movl	(%r12), %eax
	sarl	%eax
	movl	%eax, 56(%r12)
	xorl	%r14d, %r14d
LBB0_12:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RS_MAX_CTRL_MSG,4,2            ## @RS_MAX_CTRL_MSG
	.comm	_RS_QP_CTRL_SIZE,4,2            ## @RS_QP_CTRL_SIZE
	.comm	_RS_SGL_SIZE,4,2                ## @RS_SGL_SIZE
	.comm	_RS_OPT_MSG_SEND,4,2            ## @RS_OPT_MSG_SEND
	.comm	_RS_MSG_SIZE,8,3                ## @RS_MSG_SIZE
	.no_dead_strip	_rs_init_bufs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rs_init_bufs
_rs_init_bufs:                          ; @rs_init_bufs
	.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	x19, x0
	ldrsw	x8, [x0]
	add	x0, x8, #1
	mov	w1, #1
	bl	_calloc
	str	x0, [x19, #168]
	cbz	x0, LBB0_12
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w9, [x19, #16]
Lloh0:
	adrp	x10, _RS_MAX_CTRL_MSG@GOTPAGE
Lloh1:
	ldr	x10, [x10, _RS_MAX_CTRL_MSG@GOTPAGEOFF]
Lloh2:
	adrp	x11, _RS_QP_CTRL_SIZE@GOTPAGE
Lloh3:
	ldr	x11, [x11, _RS_QP_CTRL_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
Lloh5:
	ldr	w11, [x11]
	mul	w11, w11, w10
	cmp	w9, w10
	csel	w9, w11, wzr, lt
	add	x20, x8, w9, sxtw
	mov	x0, x20
	mov	w1, #1
	bl	_calloc
	str	x0, [x19, #104]
	cbz	x0, LBB0_12
; %bb.2:
	mov	x1, x0
	ldr	w0, [x19, #128]
	mov	x2, x20
	bl	_rdma_reg_msgs
	str	x0, [x19, #88]
	cbz	x0, LBB0_13
; %bb.3:
Lloh6:
	adrp	x21, _RS_SGL_SIZE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _RS_SGL_SIZE@GOTPAGEOFF]
	ldrsw	x8, [x21]
	ldrsw	x9, [x19, #20]
	add	x20, x8, x9, lsl #2
	mov	x0, x20
	bl	_malloc
	str	x0, [x19, #152]
	cbz	x0, LBB0_12
; %bb.4:
	mov	x1, x0
	ldr	w0, [x19, #128]
	mov	x2, x20
	bl	_rdma_reg_write
	str	x0, [x19, #160]
	cbz	x0, LBB0_13
; %bb.5:
	ldr	x0, [x19, #152]
	mov	w1, #0
	mov	x2, x20
	bl	_memset
	ldr	x8, [x19, #152]
	str	x8, [x19, #136]
	ldr	w9, [x19, #20]
	cbz	w9, LBB0_7
; %bb.6:
	ldrsw	x9, [x21]
	add	x8, x8, x9
	str	x8, [x19, #144]
LBB0_7:
	ldr	x20, [x19, #24]
	ldr	w8, [x19, #32]
Lloh8:
	adrp	x9, _RS_OPT_MSG_SEND@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RS_OPT_MSG_SEND@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	ldrsw	x8, [x19]
Lloh11:
	adrp	x9, _RS_MSG_SIZE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _RS_MSG_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	madd	x20, x9, x8, x20
LBB0_9:
	mov	x0, x20
	mov	w1, #1
	bl	_calloc
	str	x0, [x19, #120]
	cbz	x0, LBB0_12
; %bb.10:
	mov	x1, x0
	ldr	w0, [x19, #128]
	mov	x2, x20
	bl	_rdma_reg_write
	str	x0, [x19, #112]
	cbz	x0, LBB0_13
; %bb.11:
	mov	w0, #0
	ldp	x9, x8, [x19, #96]
	ldr	x10, [x19, #88]
	str	x8, [x9, #16]
	str	x8, [x9]
	ldr	x8, [x19, #8]
	str	x8, [x19, #40]
	ldr	w8, [x10]
	str	w8, [x9, #24]
	str	w8, [x9, #8]
	ldr	x8, [x19, #24]
	lsr	x8, x8, #1
	stp	w8, w8, [x19, #48]
	ldp	x9, x8, [x19, #64]
	sub	x8, x8, x9
	str	x8, [x19, #80]
	ldr	w8, [x19]
	asr	w8, w8, #1
	str	w8, [x19, #56]
	b	LBB0_14
LBB0_12:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	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
	b	_ERR
LBB0_13:
	mov	w0, #-1
LBB0_14:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RS_MAX_CTRL_MSG,4,2            ; @RS_MAX_CTRL_MSG
	.comm	_RS_QP_CTRL_SIZE,4,2            ; @RS_QP_CTRL_SIZE
	.comm	_RS_SGL_SIZE,4,2                ; @RS_SGL_SIZE
	.comm	_RS_OPT_MSG_SEND,4,2            ; @RS_OPT_MSG_SEND
	.comm	_RS_MSG_SIZE,8,3                ; @RS_MSG_SIZE
	.no_dead_strip	_rs_init_bufs
.subsections_via_symbols
