	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function client_connect
_client_connect:                        ## @client_connect
	.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	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -40(%rbp)
	movq	_use_rgai@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_dst_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_port@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	je	LBB0_2
## %bb.1:
	movq	_rai_hints@GOTPCREL(%rip), %rdx
	leaq	-40(%rbp), %rcx
	callq	_rdma_getaddrinfo
	jmp	LBB0_3
LBB0_2:
	movq	_ai_hints@GOTPCREL(%rip), %rdx
	leaq	-48(%rbp), %rcx
	callq	_getaddrinfo
LBB0_3:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%ebx, %edi
	callq	_gai_strerror
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_printf
	jmp	LBB0_20
LBB0_5:
	movq	-40(%rbp), %rax
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rax
LBB0_7:
	movl	8(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_rsocket
	movq	_rs@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_set_options
	movq	-40(%rbp), %rax
	movq	-48(%rbp), %rcx
	leaq	4(%rcx), %rdx
	leaq	4(%rax), %rsi
	testq	%rax, %rax
	movq	(%r15), %rdi
	cmoveq	%rcx, %rax
	cmoveq	%rdx, %rsi
	movl	(%rsi), %esi
	movl	(%rax), %edx
	callq	_rconnect
	testl	%eax, %eax
	je	LBB0_17
## %bb.8:
	movl	%eax, %r14d
	movq	_errno@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movq	_EINPROGRESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.10:
	movq	(%r15), %rax
	movq	%rax, -64(%rbp)
	movq	_POLLOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	_poll_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-72(%rbp), %rdi
	callq	_do_poll
	testl	%eax, %eax
	jne	LBB0_11
## %bb.12:
	movl	$4, -52(%rbp)
	movq	(%r15), %rdi
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %rcx
	leaq	-52(%rbp), %r8
	callq	_rgetsockopt
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_21
## %bb.13:
	movl	-56(%rbp), %eax
	testl	%eax, %eax
	jne	LBB0_14
LBB0_21:
	testl	%r14d, %r14d
	jne	LBB0_16
	jmp	LBB0_17
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_15
LBB0_11:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_15
LBB0_14:
	movl	%eax, (%r12)
	movl	$-1, %r14d
	leaq	L_.str.4(%rip), %rdi
LBB0_15:
	callq	_perror
LBB0_16:
	movq	(%r15), %rdi
	callq	_rclose
	movl	%r14d, %ebx
LBB0_17:
	movq	-40(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.18:
	callq	_rdma_freeaddrinfo
	jmp	LBB0_20
LBB0_19:
	movq	-48(%rbp), %rdi
	callq	_freeaddrinfo
LBB0_20:
	movl	%ebx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_use_rgai,8,3                   ## @use_rgai
	.comm	_dst_addr,4,2                   ## @dst_addr
	.comm	_port,4,2                       ## @port
	.comm	_rai_hints,4,2                  ## @rai_hints
	.comm	_ai_hints,4,2                   ## @ai_hints
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"getaddrinfo: %s\n"

	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_rs,8,3                         ## @rs
	.comm	_errno,4,2                      ## @errno
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
L_.str.2:                               ## @.str.2
	.asciz	"rconnect"

	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_poll_timeout,4,2               ## @poll_timeout
L_.str.3:                               ## @.str.3
	.asciz	"rpoll"

	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_ERROR,4,2                   ## @SO_ERROR
L_.str.4:                               ## @.str.4
	.asciz	"async rconnect"

	.no_dead_strip	_client_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function client_connect
_client_connect:                        ; @client_connect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	str	xzr, [sp, #40]
Lloh0:
	adrp	x8, _use_rgai@GOTPAGE
Lloh1:
	ldr	x8, [x8, _use_rgai@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _dst_addr@GOTPAGE
Lloh4:
	ldr	x9, [x9, _dst_addr@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x9]
Lloh6:
	adrp	x9, _port@GOTPAGE
Lloh7:
	ldr	x9, [x9, _port@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	cbz	x8, LBB0_3
; %bb.1:
Lloh9:
	adrp	x2, _rai_hints@GOTPAGE
Lloh10:
	ldr	x2, [x2, _rai_hints@GOTPAGEOFF]
	add	x3, sp, #40
	bl	_rdma_getaddrinfo
	mov	x19, x0
	cbz	w0, LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_gai_strerror
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	b	LBB0_14
LBB0_3:
Lloh13:
	adrp	x2, _ai_hints@GOTPAGE
Lloh14:
	ldr	x2, [x2, _ai_hints@GOTPAGEOFF]
	add	x3, sp, #32
	bl	_getaddrinfo
	mov	x19, x0
	cbnz	w0, LBB0_2
LBB0_4:
	ldp	x9, x8, [sp, #32]
	add	x9, x9, #8
	add	x10, x8, #8
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_rsocket
Lloh18:
	adrp	x20, _rs@GOTPAGE
Lloh19:
	ldr	x20, [x20, _rs@GOTPAGEOFF]
	str	x0, [x20]
	bl	_set_options
	ldp	x9, x8, [sp, #32]
	ldr	x0, [x20]
	add	x10, x9, #4
	add	x11, x8, #4
	cmp	x8, #0
	csel	x8, x9, x8, eq
	csel	x9, x10, x11, eq
	ldr	w1, [x9]
	ldr	w2, [x8]
	bl	_rconnect
	mov	x19, x0
	cbz	w0, LBB0_11
; %bb.5:
Lloh20:
	adrp	x21, _errno@GOTPAGE
Lloh21:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh22:
	adrp	x9, _EINPROGRESS@GOTPAGE
Lloh23:
	ldr	x9, [x9, _EINPROGRESS@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.6:
	ldr	x8, [x20]
Lloh25:
	adrp	x9, _POLLOUT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _POLLOUT@GOTPAGEOFF]
	str	x8, [sp, #24]
Lloh27:
	ldr	w8, [x9]
	str	w8, [sp, #16]
Lloh28:
	adrp	x8, _poll_timeout@GOTPAGE
Lloh29:
	ldr	x8, [x8, _poll_timeout@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	add	x0, sp, #16
	bl	_do_poll
	cbnz	w0, LBB0_16
; %bb.7:
	mov	w8, #4
	str	w8, [sp, #8]
	ldr	x0, [x20]
Lloh31:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x8, _SO_ERROR@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SO_ERROR@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
	add	x3, sp, #12
	add	x4, sp, #8
	bl	_rgetsockopt
	mov	x19, x0
	cbnz	w0, LBB0_9
; %bb.8:
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_17
LBB0_9:
	cbz	w19, LBB0_11
LBB0_10:
	ldr	x0, [x20]
	bl	_rclose
LBB0_11:
	ldr	x0, [sp, #40]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_rdma_freeaddrinfo
	b	LBB0_14
LBB0_13:
	ldr	x0, [sp, #32]
	bl	_freeaddrinfo
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_15:
Lloh37:
	adrp	x0, l_.str.2@PAGE
Lloh38:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	b	LBB0_10
LBB0_16:
	mov	x19, x0
Lloh39:
	adrp	x0, l_.str.3@PAGE
Lloh40:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	b	LBB0_10
LBB0_17:
	str	w8, [x21]
	mov	w19, #-1
Lloh41:
	adrp	x0, l_.str.4@PAGE
Lloh42:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_perror
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_use_rgai,8,3                   ; @use_rgai
	.comm	_dst_addr,4,2                   ; @dst_addr
	.comm	_port,4,2                       ; @port
	.comm	_rai_hints,4,2                  ; @rai_hints
	.comm	_ai_hints,4,2                   ; @ai_hints
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"getaddrinfo: %s\n"

	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_rs,8,3                         ; @rs
	.comm	_errno,4,2                      ; @errno
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
l_.str.2:                               ; @.str.2
	.asciz	"rconnect"

	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_poll_timeout,4,2               ; @poll_timeout
l_.str.3:                               ; @.str.3
	.asciz	"rpoll"

	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_ERROR,4,2                   ; @SO_ERROR
l_.str.4:                               ; @.str.4
	.asciz	"async rconnect"

	.no_dead_strip	_client_connect
.subsections_via_symbols
