	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	_dst_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_port@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rcx
	movq	%rbx, %rdx
	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_8
LBB0_2:
	movq	-24(%rbp), %rax
	movl	16(%rax), %edi
	movl	8(%rax), %edx
	movl	12(%rax), %esi
	callq	_rs_socket
	movq	_rs@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	%eax, %edi
	callq	_set_options
	movl	(%rbx), %edi
	movq	-24(%rbp), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	callq	_rs_connect
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:
	movq	_msg_op_login@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_g_msg@GOTPCREL(%rip), %rdi
	movl	%eax, (%rdi)
	movq	_CTRL_MSG_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$1000, %edx                     ## imm = 0x3E8
	callq	_client_send_recv
	xorl	%ebx, %ebx
	cmpl	(%r14), %eax
	cmovnel	%eax, %ebx
LBB0_7:
	movq	-24(%rbp), %rdi
	callq	_freeaddrinfo
LBB0_8:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	movl	(%rbx), %ebx
	jmp	LBB0_7
LBB0_5:
	movl	%eax, %ebx
	callq	_client_connect.cold.1
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function client_connect.cold.1
_client_connect.cold.1:                 ## @client_connect.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	movq	_rs@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rs_close
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_dst_addr,4,2                   ## @dst_addr
	.comm	_port,4,2                       ## @port
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"getaddrinfo: %s\n"

	.comm	_rs,4,2                         ## @rs
L_.str.1:                               ## @.str.1
	.asciz	"rsocket"

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

	.comm	_msg_op_login,4,2               ## @msg_op_login
	.comm	_g_msg,4,2                      ## @g_msg
	.comm	_CTRL_MSG_SIZE,4,2              ## @CTRL_MSG_SIZE
	.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, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #20
	bl	_memset
Lloh0:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #20]
Lloh3:
	adrp	x8, _dst_addr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _dst_addr@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _port@GOTPAGE
Lloh7:
	ldr	x8, [x8, _port@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x3, sp
	bl	_getaddrinfo
	cbz	w0, LBB0_2
; %bb.1:
	mov	x19, x0
	bl	_gai_strerror
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	b	LBB0_6
LBB0_2:
	ldr	x8, [sp]
	ldp	w1, w0, [x8, #12]
	ldr	w2, [x8, #8]
	bl	_rs_socket
Lloh11:
	adrp	x19, _rs@GOTPAGE
Lloh12:
	ldr	x19, [x19, _rs@GOTPAGEOFF]
	str	w0, [x19]
	tbnz	w0, #31, LBB0_7
; %bb.3:
	bl	_set_options
	ldr	w0, [x19]
	ldr	x8, [sp]
	ldp	w2, w1, [x8]
	bl	_rs_connect
	cbnz	w0, LBB0_8
; %bb.4:
Lloh13:
	adrp	x8, _msg_op_login@GOTPAGE
Lloh14:
	ldr	x8, [x8, _msg_op_login@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x0, _g_msg@GOTPAGE
Lloh17:
	ldr	x0, [x0, _g_msg@GOTPAGEOFF]
	str	w8, [x0]
Lloh18:
	adrp	x19, _CTRL_MSG_SIZE@GOTPAGE
Lloh19:
	ldr	x19, [x19, _CTRL_MSG_SIZE@GOTPAGEOFF]
	ldr	w1, [x19]
	mov	w2, #1000
	bl	_client_send_recv
	ldr	w8, [x19]
	cmp	w0, w8
	csel	w19, wzr, w0, eq
LBB0_5:
	ldr	x0, [sp]
	bl	_freeaddrinfo
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	ldr	w19, [x19]
	b	LBB0_5
LBB0_8:
	mov	x19, x0
	bl	_client_connect.cold.1
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function client_connect.cold.1
_client_connect.cold.1:                 ; @client_connect.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
Lloh24:
	adrp	x8, _rs@GOTPAGE
Lloh25:
	ldr	x8, [x8, _rs@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_rs_close
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_dst_addr,4,2                   ; @dst_addr
	.comm	_port,4,2                       ; @port
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"getaddrinfo: %s\n"

	.comm	_rs,4,2                         ; @rs
l_.str.1:                               ; @.str.1
	.asciz	"rsocket"

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

	.comm	_msg_op_login,4,2               ; @msg_op_login
	.comm	_g_msg,4,2                      ; @g_msg
	.comm	_CTRL_MSG_SIZE,4,2              ; @CTRL_MSG_SIZE
	.no_dead_strip	_client_connect
.subsections_via_symbols
