	.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_6
## %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_2
## %bb.3:
	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_4
## %bb.5:
	movl	%ebx, %edi
	callq	_close
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %r15
LBB0_6:
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_perror
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	jmp	LBB0_6
	.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.ge	LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	x20, x1
Lloh2:
	adrp	x8, _PF_LOCAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PF_LOCAL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.3:
	mov	x19, x0
	ldr	x1, [x20, #8]
	mov	w2, #4
	bl	_strlcpy
Lloh8:
	adrp	x8, _PF_UNIX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PF_UNIX@GOTPAGEOFF]
Lloh10:
	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_7
; %bb.4:
	mov	x0, x19
	bl	_close
Lloh11:
	adrp	x8, _EXIT_SUCCESS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EXIT_SUCCESS@GOTPAGEOFF]
LBB0_5:
	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
LBB0_6:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_perror
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	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
