	.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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_dst_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_port@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rcx
	xorl	%edx, %edx
	callq	_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_7
LBB0_2:
	movq	-24(%rbp), %rax
	movl	16(%rax), %edi
	movl	8(%rax), %edx
	movl	12(%rax), %esi
	callq	_rsocket
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	-24(%rbp), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movl	%ebx, %edi
	callq	_rconnect
	testl	%eax, %eax
	jne	LBB0_5
LBB0_6:
	movq	-24(%rbp), %rdi
	callq	_freeaddrinfo
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	jmp	LBB0_6
LBB0_5:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	movl	%ebx, %edi
	callq	_rclose
	movl	%r14d, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_dst_addr,4,2                   ## @dst_addr
	.comm	_port,4,2                       ## @port
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"getaddrinfo failed: %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"rsocket failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"rconnect failed\n"

	.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, #48
	.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
Lloh0:
	adrp	x8, _dst_addr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dst_addr@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _port@GOTPAGE
Lloh4:
	ldr	x8, [x8, _port@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x3, sp, #8
	mov	x2, #0
	bl	_getaddrinfo
	cbz	w0, LBB0_2
; %bb.1:
	mov	x19, x0
	bl	_gai_strerror
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	b	LBB0_5
LBB0_2:
	ldr	x8, [sp, #8]
	ldp	w1, w0, [x8, #12]
	ldr	w2, [x8, #8]
	bl	_rsocket
	mov	x19, x0
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	x8, [sp, #8]
	ldp	w2, w1, [x8]
	mov	x0, x19
	bl	_rconnect
	cbnz	w0, LBB0_7
LBB0_4:
	ldr	x0, [sp, #8]
	bl	_freeaddrinfo
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	b	LBB0_4
LBB0_7:
	mov	x20, x0
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	mov	x0, x19
	bl	_rclose
	mov	x19, x20
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_dst_addr,4,2                   ; @dst_addr
	.comm	_port,4,2                       ; @port
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"getaddrinfo failed: %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"rsocket failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"rconnect failed\n"

	.no_dead_strip	_client_connect
.subsections_via_symbols
