	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sockets_main                   ## -- Begin function sockets_main
	.p2align	4, 0x90
_sockets_main:                          ## @sockets_main
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %r15
	cmpl	$2, %edi
	jl	LBB0_7
## %bb.1:
	movq	%rsi, %r14
	movq	_PF_LOCAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %ebx
	movq	8(%r14), %rsi
	movl	$4, %edx
	callq	_strlcpy
	movq	_PF_UNIX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	leaq	-32(%rbp), %rsi
	movl	%ebx, %edi
	movl	$8, %edx
	callq	_bind
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.3:
	movl	%ebx, %edi
	callq	_close
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %r15
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
LBB0_6:
	callq	_warn
LBB0_7:
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_PF_LOCAL,4,2                   ## @PF_LOCAL
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socket"

	.comm	_PF_UNIX,4,2                    ## @PF_UNIX
L_.str.1:                               ## @.str.1
	.asciz	"connect"

	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sockets_main                   ; -- Begin function sockets_main
	.p2align	2
_sockets_main:                          ; @sockets_main
	.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
	cmp	w0, #2
	b.lt	LBB0_7
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x8, _PF_LOCAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PF_LOCAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.2:
	mov	x19, x0
	ldr	x1, [x20, #8]
	mov	w2, #4
	bl	_strlcpy
Lloh6:
	adrp	x8, _PF_UNIX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PF_UNIX@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #8
	bl	_bind
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_close
Lloh9:
	adrp	x8, _EXIT_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EXIT_SUCCESS@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_warn
LBB0_7:
Lloh15:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_PF_LOCAL,4,2                   ; @PF_LOCAL
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socket"

	.comm	_PF_UNIX,4,2                    ; @PF_UNIX
l_.str.1:                               ; @.str.1
	.asciz	"connect"

	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
.subsections_via_symbols
