	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_connect_buddy                  ## -- Begin function connect_buddy
	.p2align	4, 0x90
_connect_buddy:                         ## @connect_buddy
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	leaq	-24(%rbp), %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movl	8(%rbx), %edi
	callq	_htons
	movl	%eax, -16(%rbp)
	movl	4(%rbx), %eax
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_socket
	movl	%eax, (%rbx)
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	leaq	-24(%rbp), %rsi
	movl	%eax, %edi
	movl	$12, %edx
	callq	_connect
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	$-1, %ecx
	sete	%al
	negl	%eax
	jmp	LBB0_3
LBB0_1:
	movl	$-1, %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_IPPROTO_TCP,4,2                ## @IPPROTO_TCP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_connect_buddy                  ; -- Begin function connect_buddy
	.p2align	2
_connect_buddy:                         ; @connect_buddy
	.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
	mov	x19, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #12
	bl	_memset
Lloh0:
	adrp	x8, _PF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp]
	ldr	w0, [x19, #8]
	bl	_htons
	ldr	w8, [x19, #4]
	stp	w8, w0, [sp, #4]
	ldr	w0, [sp]
Lloh3:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _IPPROTO_TCP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IPPROTO_TCP@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_socket
	str	w0, [x19]
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
	mov	x1, sp
	mov	w2, #12
	bl	_connect
	cmn	w0, #1
	csetm	w0, eq
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_IPPROTO_TCP,4,2                ; @IPPROTO_TCP
.subsections_via_symbols
