	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_AF_UNIX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movl	%eax, %r15d
	movl	(%rbx), %eax
	movl	%eax, -48(%rbp)
	movq	_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_strcpy
	leaq	-56(%rbp), %rsi
	movl	%r15d, %edi
	movl	$16, %edx
	callq	_bind
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:
	movq	-56(%rbp), %rsi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	%r15d, %edi
	movl	$5, %esi
	callq	_listen
	leaq	-1088(%rbp), %rbx
	leaq	L_.str.5(%rip), %r13
	leaq	L_.str.6(%rip), %r14
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_printf
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %edi
	callq	_close
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movl	%r15d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	movl	%eax, %r12d
	cmpl	$-1, %eax
	je	LBB0_12
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_bzero
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_read
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	leaq	L_.str.3(%rip), %rdi
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	callq	_perror
	jmp	LBB0_14
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_perror
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_UNIX,4,2                    ## @AF_UNIX
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"opening stream socket"

	.comm	_NAME,4,2                       ## @NAME
L_.str.1:                               ## @.str.1
	.asciz	"binding stream socket"

L_.str.2:                               ## @.str.2
	.asciz	"Socket has name %s\033n"

L_.str.3:                               ## @.str.3
	.asciz	"accept"

L_.str.4:                               ## @.str.4
	.asciz	"reading stream message"

L_.str.5:                               ## @.str.5
	.asciz	"Ending connection\033n"

L_.str.6:                               ## @.str.6
	.asciz	"-->%s\033n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #1056
Lloh0:
	adrp	x20, _AF_UNIX@GOTPAGE
Lloh1:
	ldr	x20, [x20, _AF_UNIX@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_12
; %bb.1:
	mov	x19, x0
	ldr	w8, [x20]
	stur	w8, [x29, #-72]
Lloh5:
	adrp	x8, _NAME@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NAME@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_strcpy
	sub	x1, x29, #80
	mov	x0, x19
	mov	w2, #16
	bl	_bind
	cbnz	x0, LBB0_13
; %bb.2:
	ldur	x8, [x29, #-80]
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	mov	x0, x19
	mov	w1, #5
	bl	_listen
Lloh10:
	adrp	x20, l_.str.3@PAGE
Lloh11:
	add	x20, x20, l_.str.3@PAGEOFF
	add	x25, sp, #16
Lloh12:
	adrp	x21, l_.str.4@PAGE
Lloh13:
	add	x21, x21, l_.str.4@PAGEOFF
Lloh14:
	adrp	x22, l_.str.5@PAGE
Lloh15:
	add	x22, x22, l_.str.5@PAGEOFF
Lloh16:
	adrp	x23, l_.str.6@PAGE
Lloh17:
	add	x23, x23, l_.str.6@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_printf
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	bl	_close
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_accept
	mov	x24, x0
	cmn	w0, #1
	b.eq	LBB0_10
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #16
	mov	w1, #1024
	bl	_bzero
	add	x1, sp, #16
	mov	x0, x24
	mov	w2, #1024
	bl	_read
	tbnz	w0, #31, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	cbz	w0, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	str	x25, [sp]
	mov	x0, x23
	bl	_printf
	b	LBB0_6
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_perror
	b	LBB0_4
LBB0_12:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_14:
	bl	_perror
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_UNIX,4,2                    ; @AF_UNIX
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"opening stream socket"

	.comm	_NAME,4,2                       ; @NAME
l_.str.1:                               ; @.str.1
	.asciz	"binding stream socket"

l_.str.2:                               ; @.str.2
	.asciz	"Socket has name %s\033n"

l_.str.3:                               ; @.str.3
	.asciz	"accept"

l_.str.4:                               ; @.str.4
	.asciz	"reading stream message"

l_.str.5:                               ; @.str.5
	.asciz	"Ending connection\033n"

l_.str.6:                               ; @.str.6
	.asciz	"-->%s\033n"

.subsections_via_symbols
