	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function connect_to_ip
_connect_to_ip:                         ## @connect_to_ip
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_verb_addr
	cmpl	$4, (%rbx)
	jne	LBB0_1
## %bb.2:
	movq	_AF_INET@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_AF_INET6@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %r14d
	movl	(%rbx), %edx
	addq	$4, %rbx
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_connect
	testq	%rax, %rax
	jns	LBB0_8
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	callq	_print_sock_err
	movl	%r14d, %edi
	callq	_fd_close
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_print_sock_err
LBB0_7:
	movl	$-1, %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"connect to"

	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_AF_INET6,4,2                   ## @AF_INET6
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
L_.str.1:                               ## @.str.1
	.asciz	"socket"

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

	.no_dead_strip	_connect_to_ip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function connect_to_ip
_connect_to_ip:                         ; @connect_to_ip
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_verb_addr
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _AF_INET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AF_INET@GOTPAGEOFF]
Lloh4:
	adrp	x10, _AF_INET6@GOTPAGE
Lloh5:
	ldr	x10, [x10, _AF_INET6@GOTPAGEOFF]
	cmp	w8, #4
	csel	x8, x9, x10, eq
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x19, x0
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	ldr	w2, [x20], #4
	mov	x0, x19
	mov	x1, x20
	bl	_connect
	tbz	x0, #63, LBB0_4
; %bb.2:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_print_sock_err
	mov	x0, x19
	bl	_fd_close
	mov	w19, #-1
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_print_sock_err
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"connect to"

	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_AF_INET6,4,2                   ; @AF_INET6
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
l_.str.1:                               ; @.str.1
	.asciz	"socket"

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

	.no_dead_strip	_connect_to_ip
.subsections_via_symbols
