	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function host_connect
_host_connect:                          ## @host_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-104(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_PF_UNSPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	leaq	-56(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_getaddrinfo
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%eax, %edi
	callq	_gai_strerror
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_22
LBB0_1:
	movq	-56(%rbp), %r12
	testq	%r12, %r12
	je	LBB0_2
## %bb.4:
	movq	_INVALID_SOCKET@GOTPCREL(%rip), %rbx
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	testl	%r15d, %r15d
	jne	LBB0_14
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	32(%r12), %r12
	testq	%r12, %r12
	je	LBB0_20
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	testl	%r15d, %r15d
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %r15
	movq	%rsp, %r13
	movq	_INET6_ADDRSTRLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	addl	$50, %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	8(%r12), %rsi
	movq	(%rsi), %rdx
	movq	_AF_INET@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	setne	%al
	movq	_AF_INET6@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	setne	%cl
	testb	%cl, %al
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	24(%r12), %edi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	callq	_inet_ntop
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcpy
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	leaq	L_.str.2(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_sprintf
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movq	%r13, %rsp
	movq	%r15, %rbx
	movl	-60(%rbp), %r15d                ## 4-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	24(%r12), %edi
	movl	16(%r12), %edx
	movl	20(%r12), %esi
	callq	_socket
	cmpl	(%rbx), %eax
	je	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %r14d
	movq	8(%r12), %rsi
	movl	(%r12), %edx
	movl	%eax, %edi
	callq	_connect
	cmpl	(%rbx), %eax
	jne	LBB0_23
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=1
	testl	%r15d, %r15d
	jne	LBB0_17
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, %edi
	callq	_close
	jmp	LBB0_19
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.4(%rip), %rdi
	callq	_perror
	jmp	LBB0_19
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.5(%rip), %rdi
	callq	_perror
	jmp	LBB0_18
LBB0_20:
	movq	-56(%rbp), %rdi
	jmp	LBB0_21
LBB0_2:
	xorl	%edi, %edi
LBB0_21:
	callq	_freeaddrinfo
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_22:
	movq	_INVALID_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_26:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_28
## %bb.27:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	-56(%rbp), %rdi
	callq	_freeaddrinfo
	testl	%r15d, %r15d
	je	LBB0_25
## %bb.24:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_25:
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	callq	_fcntl
	jmp	LBB0_26
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_UNSPEC,4,2                  ## @PF_UNSPEC
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR: getaddrinfo(): %s\n"

	.comm	_INVALID_SOCKET,4,2             ## @INVALID_SOCKET
	.comm	_INET6_ADDRSTRLEN,4,2           ## @INET6_ADDRSTRLEN
	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_AF_INET6,8,3                   ## @AF_INET6
L_.str.1:                               ## @.str.1
	.asciz	"<invalid>"

L_.str.2:                               ## @.str.2
	.asciz	"<unknown family: %d>"

L_.str.3:                               ## @.str.3
	.asciz	"connecting to: %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"socket()"

L_.str.5:                               ## @.str.5
	.asciz	"connect()"

L_.str.6:                               ## @.str.6
	.asciz	"ERROR: failed to connect\n"

L_.str.7:                               ## @.str.7
	.asciz	"connected.\n"

	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_FIONBIO,4,2                    ## @FIONBIO
	.no_dead_strip	_host_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function host_connect
_host_connect:                          ; @host_connect
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #64
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	sub	x0, x29, #128
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh3:
	adrp	x8, _PF_UNSPEC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PF_UNSPEC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _SOCK_STREAM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SOCK_STREAM@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x29, #-108]
	sub	x2, x29, #128
	sub	x3, x29, #136
	mov	x0, x21
	mov	x1, x20
	bl	_getaddrinfo
	cbz	w0, LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w19, [x8]
	bl	_gai_strerror
	str	x0, [sp, #-16]!
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	add	sp, sp, #16
	b	LBB0_21
LBB0_2:
	ldur	x26, [x29, #-136]
	cbz	x26, LBB0_19
; %bb.3:
Lloh14:
	adrp	x28, _INVALID_SOCKET@GOTPAGE
Lloh15:
	ldr	x28, [x28, _INVALID_SOCKET@GOTPAGEOFF]
Lloh16:
	adrp	x21, _INET6_ADDRSTRLEN@GOTPAGE
Lloh17:
	ldr	x21, [x21, _INET6_ADDRSTRLEN@GOTPAGEOFF]
Lloh18:
	adrp	x20, _AF_INET@GOTPAGE
Lloh19:
	ldr	x20, [x20, _AF_INET@GOTPAGEOFF]
Lloh20:
	adrp	x24, _AF_INET6@GOTPAGE
Lloh21:
	ldr	x24, [x24, _AF_INET6@GOTPAGEOFF]
Lloh22:
	adrp	x27, _stderr@GOTPAGE
Lloh23:
	ldr	x27, [x27, _stderr@GOTPAGEOFF]
Lloh24:
	adrp	x23, l_.str.3@PAGE
Lloh25:
	add	x23, x23, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	cbnz	w19, LBB0_16
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x26, [x26, #32]
	cbz	x26, LBB0_18
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w19, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x22, sp
	ldr	w8, [x21]
	add	w3, w8, #50
	mov	x9, x3
Lloh26:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh27:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x3, #15
	and	x9, x9, #0x1fffffff0
	sub	x25, x8, x9
	mov	sp, x25
	ldr	x1, [x26, #8]
	ldr	x2, [x1]
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x2, x9
	ccmp	x2, x8, #4, ne
	ccmp	x1, #0, #4, eq
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_sprintf
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x26, #24]
	mov	x2, x25
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_inet_ntop
	cbnz	w0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcpy
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x27]
	str	x25, [sp, #-16]!
	mov	x1, x23
	bl	_fprintf
	add	sp, sp, #16
	mov	sp, x22
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldp	w1, w0, [x26, #20]
	ldr	w2, [x26, #16]
	bl	_socket
	ldr	w8, [x28]
	cmp	w0, w8
	b.eq	LBB0_4
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x25, x0
	ldr	x1, [x26, #8]
	ldr	w2, [x26]
	bl	_connect
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_24
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	cbnz	w19, LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
	bl	_close
	b	LBB0_5
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh32:
	adrp	x0, l_.str.4@PAGE
Lloh33:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_perror
	b	LBB0_5
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh34:
	adrp	x0, l_.str.5@PAGE
Lloh35:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_perror
	b	LBB0_15
LBB0_18:
	ldur	x0, [x29, #-136]
	b	LBB0_20
LBB0_19:
	mov	x0, #0
LBB0_20:
	bl	_freeaddrinfo
Lloh36:
	adrp	x8, _stderr@GOTPAGE
Lloh37:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
Lloh39:
	adrp	x1, l_.str.6@PAGE
Lloh40:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
LBB0_21:
Lloh41:
	adrp	x8, _INVALID_SOCKET@GOTPAGE
Lloh42:
	ldr	x8, [x8, _INVALID_SOCKET@GOTPAGEOFF]
Lloh43:
	ldr	w25, [x8]
LBB0_22:
	ldur	x8, [x29, #-88]
Lloh44:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh45:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.23:
	mov	x0, x25
	sub	sp, x29, #80
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_24:
	ldur	x0, [x29, #-136]
	bl	_freeaddrinfo
	cbz	w19, LBB0_26
; %bb.25:
	ldr	w0, [x27]
Lloh47:
	adrp	x1, l_.str.7@PAGE
Lloh48:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_fprintf
LBB0_26:
Lloh49:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh50:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
Lloh52:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh53:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh54:
	ldr	w2, [x8]
	mov	x0, x25
	bl	_fcntl
	b	LBB0_22
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_UNSPEC,4,2                  ; @PF_UNSPEC
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR: getaddrinfo(): %s\n"

	.comm	_INVALID_SOCKET,4,2             ; @INVALID_SOCKET
	.comm	_INET6_ADDRSTRLEN,4,2           ; @INET6_ADDRSTRLEN
	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_AF_INET6,8,3                   ; @AF_INET6
l_.str.1:                               ; @.str.1
	.asciz	"<invalid>"

l_.str.2:                               ; @.str.2
	.asciz	"<unknown family: %d>"

l_.str.3:                               ; @.str.3
	.asciz	"connecting to: %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"socket()"

l_.str.5:                               ; @.str.5
	.asciz	"connect()"

l_.str.6:                               ; @.str.6
	.asciz	"ERROR: failed to connect\n"

l_.str.7:                               ; @.str.7
	.asciz	"connected.\n"

	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_FIONBIO,4,2                    ; @FIONBIO
	.no_dead_strip	_host_connect
.subsections_via_symbols
