	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function test
LCPI0_0:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_test:                                  ## @test
	.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	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_port@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_hints@GOTPCREL(%rip), %r12
	leaq	-40(%rbp), %rcx
	xorl	%edi, %edi
	movq	%r12, %rdx
	callq	_rdma_getaddrinfo
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_gai_strerror
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_printf
	jmp	LBB0_20
LBB0_2:
	leaq	-112(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [1,1,1,1]
	movups	%xmm0, -96(%rbp)
	movq	-40(%rbp), %rsi
	movq	_listen_id@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_rdma_create_ep
	movl	%eax, %ebx
	movq	-40(%rbp), %rdi
	callq	_rdma_freeaddrinfo
	testl	%ebx, %ebx
	jne	LBB0_3
## %bb.4:
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_rdma_listen
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:
	movl	(%r14), %edi
	movq	_id@GOTPCREL(%rip), %r15
	movq	%r15, %rsi
	callq	_rdma_get_request
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:
	movq	(%r12), %rax
	movq	_IBV_QPT_XRC_RECV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	xorl	%eax, %eax
	callq	_create_srq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
LBB0_10:
	movl	(%r15), %edi
	movq	_recv_msg@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$4, %edx
	callq	_rdma_reg_msgs
	movq	_mr@GOTPCREL(%rip), %r12
	movl	%eax, (%r12)
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	(%r15), %edi
	movl	(%rbx), %edx
	xorl	%esi, %esi
	movl	$4, %ecx
	movl	%eax, %r8d
	callq	_rdma_post_recv
	testl	%eax, %eax
	jne	LBB0_13
## %bb.14:
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_srqn@GOTPCREL(%rip), %rax
	movq	%rax, -72(%rbp)
	movl	$4, -80(%rbp)
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_rdma_accept
	testl	%eax, %eax
	jne	LBB0_15
## %bb.16:
	movl	(%r15), %edi
	leaq	-48(%rbp), %rsi
	callq	_rdma_get_recv_comp
	testl	%eax, %eax
	jle	LBB0_17
## %bb.18:
	movl	(%r15), %edi
	callq	_rdma_disconnect
	movl	(%r12), %edi
	callq	_rdma_dereg_mr
	movl	(%r15), %edi
	callq	_rdma_destroy_ep
	movl	(%r14), %edi
	callq	_rdma_destroy_ep
LBB0_19:
	xorl	%ebx, %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	jmp	LBB0_20
LBB0_5:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	jmp	LBB0_20
LBB0_7:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	callq	_perror
	jmp	LBB0_20
LBB0_11:
	leaq	L_.str.4(%rip), %rdi
	callq	_perror
	jmp	LBB0_19
LBB0_13:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rdi
	callq	_perror
	jmp	LBB0_20
LBB0_15:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rdi
	callq	_perror
	jmp	LBB0_20
LBB0_17:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rdi
	callq	_perror
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_port,4,2                       ## @port
	.comm	_hints,8,3                      ## @hints
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rdma_getaddrinfo: %s\n"

	.comm	_listen_id,4,2                  ## @listen_id
L_.str.1:                               ## @.str.1
	.asciz	"rdma_create_ep"

L_.str.2:                               ## @.str.2
	.asciz	"rdma_listen"

	.comm	_id,4,2                         ## @id
L_.str.3:                               ## @.str.3
	.asciz	"rdma_get_request"

	.comm	_IBV_QPT_XRC_RECV,8,3           ## @IBV_QPT_XRC_RECV
	.comm	_recv_msg,4,2                   ## @recv_msg
	.comm	_mr,4,2                         ## @mr
L_.str.4:                               ## @.str.4
	.asciz	"rdma_reg_msgs"

L_.str.5:                               ## @.str.5
	.asciz	"rdma_post_recv"

	.comm	_srqn,4,2                       ## @srqn
L_.str.6:                               ## @.str.6
	.asciz	"rdma_accept"

L_.str.7:                               ## @.str.7
	.asciz	"rdma_get_recv_comp"

	.no_dead_strip	_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test
_test:                                  ; @test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
Lloh0:
	adrp	x8, _port@GOTPAGE
Lloh1:
	ldr	x8, [x8, _port@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x22, _hints@GOTPAGE
Lloh4:
	ldr	x22, [x22, _hints@GOTPAGEOFF]
	sub	x3, x29, #56
	mov	x0, #0
	mov	x2, x22
	bl	_rdma_getaddrinfo
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	bl	_gai_strerror
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	b	LBB0_13
LBB0_2:
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	movi.4s	v0, #1
	stur	q0, [sp, #56]
	ldur	x1, [x29, #-56]
Lloh7:
	adrp	x19, _listen_id@GOTPAGE
Lloh8:
	ldr	x19, [x19, _listen_id@GOTPAGEOFF]
	add	x3, sp, #40
	mov	x0, x19
	mov	x2, #0
	bl	_rdma_create_ep
	mov	x20, x0
	ldur	x0, [x29, #-56]
	bl	_rdma_freeaddrinfo
	cbnz	w20, LBB0_14
; %bb.3:
	ldr	w0, [x19]
	mov	w1, #0
	bl	_rdma_listen
	cbnz	w0, LBB0_15
; %bb.4:
	ldr	w0, [x19]
Lloh9:
	adrp	x21, _id@GOTPAGE
Lloh10:
	ldr	x21, [x21, _id@GOTPAGEOFF]
	mov	x1, x21
	bl	_rdma_get_request
	cbnz	w0, LBB0_16
; %bb.5:
	ldr	x8, [x22]
Lloh11:
	adrp	x9, _IBV_QPT_XRC_RECV@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IBV_QPT_XRC_RECV@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	bl	_create_srq
	mov	x20, x0
	cbnz	w0, LBB0_13
LBB0_7:
	ldr	w0, [x21]
Lloh14:
	adrp	x20, _recv_msg@GOTPAGE
Lloh15:
	ldr	x20, [x20, _recv_msg@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w2, #4
	bl	_rdma_reg_msgs
Lloh16:
	adrp	x22, _mr@GOTPAGE
Lloh17:
	ldr	x22, [x22, _mr@GOTPAGEOFF]
	str	w0, [x22]
	cbz	w0, LBB0_17
; %bb.8:
	mov	x4, x0
	ldr	w0, [x21]
	ldr	w2, [x20]
	mov	w23, #4
	mov	x1, #0
	mov	w3, #4
	bl	_rdma_post_recv
	cbnz	w0, LBB0_18
; %bb.9:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh18:
	adrp	x8, _srqn@GOTPAGE
Lloh19:
	ldr	x8, [x8, _srqn@GOTPAGEOFF]
	str	x8, [sp, #16]
	str	w23, [sp, #8]
	ldr	w0, [x21]
	add	x1, sp, #8
	bl	_rdma_accept
	cbnz	w0, LBB0_19
; %bb.10:
	ldr	w0, [x21]
	mov	x1, sp
	bl	_rdma_get_recv_comp
	cmp	w0, #0
	b.le	LBB0_20
; %bb.11:
	ldr	w0, [x21]
	bl	_rdma_disconnect
	ldr	w0, [x22]
	bl	_rdma_dereg_mr
	ldr	w0, [x21]
	bl	_rdma_destroy_ep
	ldr	w0, [x19]
	bl	_rdma_destroy_ep
LBB0_12:
	mov	w20, #0
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_14:
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	b	LBB0_13
LBB0_15:
	mov	x20, x0
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	b	LBB0_13
LBB0_16:
	mov	x20, x0
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	b	LBB0_13
LBB0_17:
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_perror
	b	LBB0_12
LBB0_18:
	mov	x20, x0
Lloh28:
	adrp	x0, l_.str.5@PAGE
Lloh29:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_perror
	b	LBB0_13
LBB0_19:
	mov	x20, x0
Lloh30:
	adrp	x0, l_.str.6@PAGE
Lloh31:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_perror
	b	LBB0_13
LBB0_20:
	mov	x20, x0
Lloh32:
	adrp	x0, l_.str.7@PAGE
Lloh33:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_perror
	b	LBB0_13
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_port,4,2                       ; @port
	.comm	_hints,8,3                      ; @hints
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rdma_getaddrinfo: %s\n"

	.comm	_listen_id,4,2                  ; @listen_id
l_.str.1:                               ; @.str.1
	.asciz	"rdma_create_ep"

l_.str.2:                               ; @.str.2
	.asciz	"rdma_listen"

	.comm	_id,4,2                         ; @id
l_.str.3:                               ; @.str.3
	.asciz	"rdma_get_request"

	.comm	_IBV_QPT_XRC_RECV,8,3           ; @IBV_QPT_XRC_RECV
	.comm	_recv_msg,4,2                   ; @recv_msg
	.comm	_mr,4,2                         ; @mr
l_.str.4:                               ; @.str.4
	.asciz	"rdma_reg_msgs"

l_.str.5:                               ; @.str.5
	.asciz	"rdma_post_recv"

	.comm	_srqn,4,2                       ; @srqn
l_.str.6:                               ; @.str.6
	.asciz	"rdma_accept"

l_.str.7:                               ; @.str.7
	.asciz	"rdma_get_recv_comp"

	.no_dead_strip	_test
.subsections_via_symbols
