	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function connect_handler
_connect_handler:                       ## @connect_handler
	.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, %r14
	movq	_test@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	_connections@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	movq	8(%rcx), %rdx
	leaq	1(%rax), %rsi
	movq	%rsi, (%rcx)
	leaq	(%rdx,%rax,8), %r15
	movq	%r14, (%rdx,%rax,8)
	movq	%r15, (%r14)
	movq	%r15, %rdi
	callq	_init_node
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	%r15, %rdi
	callq	_post_recvs
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_6:
	movq	$0, (%r15)
	xorl	%eax, %eax
	callq	_connect_error
LBB0_7:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_rdma_reject
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	(%r15), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_rdma_accept
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rdi
	callq	_perror
	movl	%r12d, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_test,16,3                      ## @test
	.comm	_connections,8,3                ## @connections
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cmatose: failure accepting"

L_str:                                  ## @str
	.asciz	"cmatose: failing connection request"

	.no_dead_strip	_connect_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function connect_handler
_connect_handler:                       ; @connect_handler
	.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
Lloh0:
	adrp	x8, _test@GOTPAGE
Lloh1:
	ldr	x8, [x8, _test@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh2:
	adrp	x10, _connections@GOTPAGE
Lloh3:
	ldr	x10, [x10, _connections@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_2:
	ldr	x10, [x8, #8]
	add	x11, x9, #1
	str	x11, [x8]
	add	x21, x10, x9, lsl #3
	str	x19, [x21]
	str	x21, [x19]
	mov	x0, x21
	bl	_init_node
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_post_recvs
	mov	x20, x0
	cbz	w0, LBB0_7
LBB0_4:
	str	xzr, [x21]
	bl	_connect_error
LBB0_5:
Lloh8:
	adrp	x0, l_str@PAGE
Lloh9:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	x0, x19
	mov	x1, #0
	mov	w2, #0
	bl	_rdma_reject
LBB0_6:
	mov	x0, x20
	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
LBB0_7:
	ldr	x0, [x21]
	mov	x1, #0
	bl	_rdma_accept
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.8:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_test,16,3                      ; @test
	.comm	_connections,8,3                ; @connections
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cmatose: failure accepting"

l_str:                                  ; @str
	.asciz	"cmatose: failing connection request"

	.no_dead_strip	_connect_handler
.subsections_via_symbols
