	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-96(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_PF_UNSPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	leaq	-56(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_getaddrinfo
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	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
LBB0_16:
	movl	$-1, %ebx
	jmp	LBB0_17
LBB0_2:
	movq	-56(%rbp), %r14
	testq	%r14, %r14
	je	LBB0_14
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %r12
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsp, %r13
	movq	_INET6_ADDRSTRLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	addl	$50, %r15d
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	8(%r14), %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_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	24(%r14), %edi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	callq	_inet_ntop
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_sprintf
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	24(%r14), %edi
	movl	16(%r14), %edx
	movl	20(%r14), %esi
	callq	_socket
	testl	%eax, %eax
	js	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %ebx
	movq	8(%r14), %rsi
	movl	(%r14), %edx
	movl	%eax, %edi
	callq	_connect
	testq	%rax, %rax
	jns	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.4(%rip), %rdi
	callq	_perror
	movl	%ebx, %edi
	callq	_close
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rsp
	movq	32(%r14), %r14
	testq	%r14, %r14
	jne	LBB0_4
	jmp	LBB0_19
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.3(%rip), %rdi
	callq	_perror
	jmp	LBB0_11
LBB0_13:
	movq	%r13, %rsp
	movq	-56(%rbp), %rdi
	callq	_freeaddrinfo
	movl	(%r12), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.18:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	xorl	%edi, %edi
LBB0_15:
	callq	_freeaddrinfo
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_16
LBB0_19:
	movq	-56(%rbp), %rdi
	jmp	LBB0_15
LBB0_20:
	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	_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	"<unknown family: %d>"

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

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

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

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

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

	.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, x1
	mov	x20, 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, x20
	mov	x1, x19
	bl	_getaddrinfo
	cbz	w0, LBB0_3
; %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
LBB0_2:
	mov	w23, #-1
	b	LBB0_14
LBB0_3:
	ldur	x24, [x29, #-136]
	cbz	x24, LBB0_16
; %bb.4:
Lloh14:
	adrp	x26, _INET6_ADDRSTRLEN@GOTPAGE
Lloh15:
	ldr	x26, [x26, _INET6_ADDRSTRLEN@GOTPAGEOFF]
Lloh16:
	adrp	x27, _AF_INET@GOTPAGE
Lloh17:
	ldr	x27, [x27, _AF_INET@GOTPAGEOFF]
Lloh18:
	adrp	x19, l_.str.1@PAGE
Lloh19:
	add	x19, x19, l_.str.1@PAGEOFF
Lloh20:
	adrp	x28, _AF_INET6@GOTPAGE
Lloh21:
	ldr	x28, [x28, _AF_INET6@GOTPAGEOFF]
Lloh22:
	adrp	x25, _stderr@GOTPAGE
Lloh23:
	ldr	x25, [x25, _stderr@GOTPAGEOFF]
Lloh24:
	adrp	x20, l_.str.2@PAGE
Lloh25:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh26:
	adrp	x22, l_.str.4@PAGE
Lloh27:
	add	x22, x22, l_.str.4@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x21, sp
	ldr	w8, [x26]
	add	w3, w8, #50
	mov	x9, x3
Lloh28:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh29:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x3, #15
	and	x9, x9, #0x1fffffff0
	sub	x23, x8, x9
	mov	sp, x23
	ldr	x1, [x24, #8]
	ldr	x2, [x1]
	ldr	x8, [x27]
	ldr	x9, [x28]
	cmp	x2, x9
	ccmp	x2, x8, #4, ne
	ccmp	x1, #0, #4, eq
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_sprintf
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x24, #24]
	mov	x2, x23
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_inet_ntop
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x25]
	str	x23, [sp, #-16]!
	mov	x1, x20
	bl	_fprintf
	add	sp, sp, #16
	ldp	w1, w0, [x24, #20]
	ldr	w2, [x24, #16]
	bl	_socket
	tbnz	w0, #31, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x0
	ldr	x1, [x24, #8]
	ldr	w2, [x24]
	bl	_connect
	tbz	x0, #63, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_perror
	mov	x0, x23
	bl	_close
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	sp, x21
	ldr	x24, [x24, #32]
	cbnz	x24, LBB0_5
	b	LBB0_18
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh30:
	adrp	x0, l_.str.3@PAGE
Lloh31:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	b	LBB0_11
LBB0_13:
	mov	sp, x21
	ldur	x0, [x29, #-136]
	bl	_freeaddrinfo
	ldr	w0, [x25]
Lloh32:
	adrp	x1, l_.str.6@PAGE
Lloh33:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
LBB0_14:
	ldur	x8, [x29, #-88]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.15:
	mov	x0, x23
	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_16:
	mov	x0, #0
LBB0_17:
	bl	_freeaddrinfo
Lloh37:
	adrp	x8, _stderr@GOTPAGE
Lloh38:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
Lloh40:
	adrp	x1, l_.str.5@PAGE
Lloh41:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
	b	LBB0_2
LBB0_18:
	ldur	x0, [x29, #-136]
	b	LBB0_17
LBB0_19:
	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	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.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	_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	"<unknown family: %d>"

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

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

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

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

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

	.no_dead_strip	_host_connect
.subsections_via_symbols
