	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_message
_create_message:                        ## @create_message
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_message_size@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movq	_message_count@GOTPCREL(%rip), %rax
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.3:
	addq	$4, %rdi
	callq	_malloc
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	8(%r14), %edi
	movq	(%r15), %rdx
	addq	$4, %rdx
	movq	_IBV_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %esi
	callq	_ibv_reg_mr
	movl	%eax, 4(%r14)
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	leaq	L_str.2(%rip), %rdi
	callq	_puts
	movl	(%r14), %edi
	callq	_free
	jmp	LBB0_7
LBB0_1:
	movq	$0, (%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_4:
	leaq	L_str(%rip), %rdi
	callq	_puts
LBB0_7:
	movl	$-1, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_message_size,8,3               ## @message_size
	.comm	_message_count,8,3              ## @message_count
	.comm	_IBV_ACCESS_LOCAL_WRITE,4,2     ## @IBV_ACCESS_LOCAL_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"failed message allocation"

L_str.2:                                ## @str.2
	.asciz	"failed to reg MR"

	.no_dead_strip	_create_message
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_message
_create_message:                        ; @create_message
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x20, _message_size@GOTPAGE
Lloh1:
	ldr	x20, [x20, _message_size@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.1:
Lloh2:
	adrp	x9, _message_count@GOTPAGE
Lloh3:
	ldr	x9, [x9, _message_count@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cbz	x9, LBB0_4
; %bb.2:
	mov	x19, x0
	add	x0, x8, #4
	bl	_malloc
	str	w0, [x19]
	cbz	w0, LBB0_6
; %bb.3:
	mov	x1, x0
	ldr	w0, [x19, #8]
	ldr	x8, [x20]
	add	x2, x8, #4
Lloh5:
	adrp	x8, _IBV_ACCESS_LOCAL_WRITE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IBV_ACCESS_LOCAL_WRITE@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	bl	_ibv_reg_mr
	str	w0, [x19, #4]
	cbz	w0, LBB0_7
LBB0_4:
	mov	w0, #0
	b	LBB0_9
LBB0_5:
	mov	w0, #0
Lloh8:
	adrp	x8, _message_count@GOTPAGE
Lloh9:
	ldr	x8, [x8, _message_count@GOTPAGEOFF]
Lloh10:
	str	xzr, [x8]
	b	LBB0_9
LBB0_6:
Lloh11:
	adrp	x0, l_str@PAGE
Lloh12:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	b	LBB0_8
LBB0_7:
Lloh13:
	adrp	x0, l_str.2@PAGE
Lloh14:
	add	x0, x0, l_str.2@PAGEOFF
	bl	_puts
	ldr	w0, [x19]
	bl	_free
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_message_size,8,3               ; @message_size
	.comm	_message_count,8,3              ; @message_count
	.comm	_IBV_ACCESS_LOCAL_WRITE,4,2     ; @IBV_ACCESS_LOCAL_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"failed message allocation"

l_str.2:                                ; @str.2
	.asciz	"failed to reg MR"

	.no_dead_strip	_create_message
.subsections_via_symbols
