	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SHUT_RDWR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	$-1, %edi
	callq	_shutdown
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EBADF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_3:
	movq	_PF_INET@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r14d
	cmpl	$-1, %eax
	jne	LBB0_5
## %bb.4:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_5:
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	_bzero
	movl	$32, -80(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movq	_INADDR_LOOPBACK@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_htonl
	movq	%rax, -64(%rbp)
	movq	$0, -72(%rbp)
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movl	$32, %edx
	callq	_bind
	testq	%rax, %rax
	jns	LBB0_7
## %bb.6:
	movq	-64(%rbp), %rdi
	callq	_inet_ntoa
	movl	%eax, %ebx
	movq	%r15, %r13
	movq	-72(%rbp), %r15
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movl	$-1, %edi
	movl	%ebx, %edx
	movq	%r15, %rcx
	movq	%r13, %r15
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_errx
LBB0_7:
	movl	$32, -44(%rbp)
	leaq	-80(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	%r14d, %edi
	callq	_getsockname
	testq	%rax, %rax
	jns	LBB0_9
## %bb.8:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str.3(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_9:
	movq	-72(%rbp), %r13
	movl	%r14d, %edi
	movl	$-1, %esi
	callq	_listen
	testq	%rax, %rax
	jns	LBB0_11
## %bb.10:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str.4(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_11:
	movl	(%r15), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_13
## %bb.12:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str.5(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_13:
	leaq	-80(%rbp), %r15
	movq	%r15, %rdi
	movl	$32, %esi
	callq	_bzero
	movl	$32, -80(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movl	(%r12), %edi
	callq	_htonl
	movq	%rax, -64(%rbp)
	movq	%r13, -72(%rbp)
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	$32, %edx
	callq	_connect
	testq	%rax, %rax
	jns	LBB0_15
## %bb.14:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str.6(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_15:
	movq	_SHUT_RD@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	decq	%rsi
	movl	%ebx, %edi
	callq	_shutdown
	cmpl	$-1, %eax
	je	LBB0_18
## %bb.16:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_18
## %bb.17:
	leaq	L_.str.7(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_18:
	movq	_SHUT_RDWR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	incq	%rsi
	movl	%ebx, %edi
	callq	_shutdown
	cmpl	$-1, %eax
	je	LBB0_21
## %bb.19:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.8(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_21:
	movq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_shutdown
	testl	%eax, %eax
	jns	LBB0_23
## %bb.22:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str.9(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_23:
	movq	_SHUT_WR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%ebx, %edi
	callq	_shutdown
	testl	%eax, %eax
	jns	LBB0_25
## %bb.24:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str.10(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_25:
	movl	%ebx, %edi
	callq	_close
	movl	%r14d, %edi
	callq	_close
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SHUT_RDWR,8,3                  ## @SHUT_RDWR
	.comm	_errno,8,3                      ## @errno
	.comm	_EBADF,8,3                      ## @EBADF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"shutdown() for invalid file descriptor does not return EBADF"

	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
L_.str.1:                               ## @.str.1
	.asciz	"socket(PF_INET, SOCK_STREAM, 0) for listen socket: %s"

	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_INADDR_LOOPBACK,4,2            ## @INADDR_LOOPBACK
L_.str.2:                               ## @.str.2
	.asciz	"bind(%s, %d) for listen socket: %s"

L_.str.3:                               ## @.str.3
	.asciz	"getsockname() for listen socket: %s"

L_.str.4:                               ## @.str.4
	.asciz	"listen() for listen socket: %s"

L_.str.5:                               ## @.str.5
	.asciz	"socket(PF_INET, SOCK_STREAM, 0) for connect socket: %s"

L_.str.6:                               ## @.str.6
	.asciz	"connect() for connect socket: %s"

	.comm	_SHUT_RD,8,3                    ## @SHUT_RD
	.comm	_EINVAL,8,3                     ## @EINVAL
L_.str.7:                               ## @.str.7
	.asciz	"shutdown(SHUT_RD - 1) does not return EINVAL"

L_.str.8:                               ## @.str.8
	.asciz	"shutdown(SHUT_RDWR + 1) does not return EINVAL"

L_.str.9:                               ## @.str.9
	.asciz	"shutdown(SHUT_RD) for connect socket: %s"

	.comm	_SHUT_WR,8,3                    ## @SHUT_WR
L_.str.10:                              ## @.str.10
	.asciz	"shutdown(SHUT_WR) for connect socket: %s"

.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:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x22, _SHUT_RDWR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SHUT_RDWR@GOTPAGEOFF]
	ldr	x1, [x22]
	mov	w0, #-1
	bl	_shutdown
Lloh2:
	adrp	x21, _errno@GOTPAGE
Lloh3:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x21]
Lloh4:
	adrp	x9, _EBADF@GOTPAGE
Lloh5:
	ldr	x9, [x9, _EBADF@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_3:
Lloh9:
	adrp	x23, _PF_INET@GOTPAGE
Lloh10:
	ldr	x23, [x23, _PF_INET@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh11:
	adrp	x24, _SOCK_STREAM@GOTPAGE
Lloh12:
	ldr	x24, [x24, _SOCK_STREAM@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	w2, #0
	bl	_socket
	mov	x19, x0
	cmn	w0, #1
	b.ne	LBB0_5
; %bb.4:
	ldr	x0, [x21]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_5:
	mov	w27, #32
	add	x0, sp, #32
	mov	w1, #32
	bl	_bzero
Lloh15:
	adrp	x25, _AF_INET@GOTPAGE
Lloh16:
	ldr	x25, [x25, _AF_INET@GOTPAGEOFF]
	str	w27, [sp, #32]
	ldr	x8, [x25]
	str	x8, [sp, #56]
Lloh17:
	adrp	x26, _INADDR_LOOPBACK@GOTPAGE
Lloh18:
	ldr	x26, [x26, _INADDR_LOOPBACK@GOTPAGEOFF]
	ldr	w0, [x26]
	bl	_htonl
	stp	xzr, x0, [sp, #40]
	add	x1, sp, #32
	mov	x0, x19
	mov	w2, #32
	bl	_bind
	tbz	x0, #63, LBB0_7
; %bb.6:
	ldr	x0, [sp, #48]
	bl	_inet_ntoa
	mov	x20, x0
	ldr	x28, [sp, #40]
	ldr	x0, [x21]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x28, x0, [sp, #8]
	str	x20, [sp]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_7:
	str	w27, [sp, #28]
	add	x1, sp, #32
	add	x2, sp, #28
	mov	x0, x19
	bl	_getsockname
	tbz	x0, #63, LBB0_9
; %bb.8:
	ldr	x0, [x21]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_9:
	ldr	x27, [sp, #40]
	mov	x0, x19
	mov	w1, #-1
	bl	_listen
	tbz	x0, #63, LBB0_11
; %bb.10:
	ldr	x0, [x21]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_11:
	ldr	w0, [x23]
	ldr	w1, [x24]
	mov	w2, #0
	bl	_socket
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_13
; %bb.12:
	ldr	x0, [x21]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_13:
	mov	w23, #32
	add	x0, sp, #32
	mov	w1, #32
	bl	_bzero
	str	w23, [sp, #32]
	ldr	x8, [x25]
	str	x8, [sp, #56]
	ldr	w0, [x26]
	bl	_htonl
	stp	x27, x0, [sp, #40]
	add	x1, sp, #32
	mov	x0, x20
	mov	w2, #32
	bl	_connect
	tbz	x0, #63, LBB0_15
; %bb.14:
	ldr	x0, [x21]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh27:
	adrp	x1, l_.str.6@PAGE
Lloh28:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_15:
Lloh29:
	adrp	x23, _SHUT_RD@GOTPAGE
Lloh30:
	ldr	x23, [x23, _SHUT_RD@GOTPAGEOFF]
	ldr	x8, [x23]
	sub	x1, x8, #1
	mov	x0, x20
	bl	_shutdown
Lloh31:
	adrp	x24, _EINVAL@GOTPAGE
Lloh32:
	ldr	x24, [x24, _EINVAL@GOTPAGEOFF]
	cmn	w0, #1
	b.eq	LBB0_18
; %bb.16:
	ldr	x8, [x21]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_18
; %bb.17:
Lloh33:
	adrp	x1, l_.str.7@PAGE
Lloh34:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_18:
	ldr	x8, [x22]
	add	x1, x8, #1
	mov	x0, x20
	bl	_shutdown
	cmn	w0, #1
	b.eq	LBB0_21
; %bb.19:
	ldr	x8, [x21]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_21
; %bb.20:
Lloh35:
	adrp	x1, l_.str.8@PAGE
Lloh36:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_21:
	ldr	x1, [x23]
	mov	x0, x20
	bl	_shutdown
	tbz	w0, #31, LBB0_23
; %bb.22:
	ldr	x0, [x21]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh37:
	adrp	x1, l_.str.9@PAGE
Lloh38:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_23:
Lloh39:
	adrp	x8, _SHUT_WR@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SHUT_WR@GOTPAGEOFF]
Lloh41:
	ldr	x1, [x8]
	mov	x0, x20
	bl	_shutdown
	tbz	w0, #31, LBB0_25
; %bb.24:
	ldr	x0, [x21]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh42:
	adrp	x1, l_.str.10@PAGE
Lloh43:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_25:
	mov	x0, x20
	bl	_close
	mov	x0, x19
	bl	_close
	mov	w0, #0
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_SHUT_RDWR,8,3                  ; @SHUT_RDWR
	.comm	_errno,8,3                      ; @errno
	.comm	_EBADF,8,3                      ; @EBADF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"shutdown() for invalid file descriptor does not return EBADF"

	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
l_.str.1:                               ; @.str.1
	.asciz	"socket(PF_INET, SOCK_STREAM, 0) for listen socket: %s"

	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_INADDR_LOOPBACK,4,2            ; @INADDR_LOOPBACK
l_.str.2:                               ; @.str.2
	.asciz	"bind(%s, %d) for listen socket: %s"

l_.str.3:                               ; @.str.3
	.asciz	"getsockname() for listen socket: %s"

l_.str.4:                               ; @.str.4
	.asciz	"listen() for listen socket: %s"

l_.str.5:                               ; @.str.5
	.asciz	"socket(PF_INET, SOCK_STREAM, 0) for connect socket: %s"

l_.str.6:                               ; @.str.6
	.asciz	"connect() for connect socket: %s"

	.comm	_SHUT_RD,8,3                    ; @SHUT_RD
	.comm	_EINVAL,8,3                     ; @EINVAL
l_.str.7:                               ; @.str.7
	.asciz	"shutdown(SHUT_RD - 1) does not return EINVAL"

l_.str.8:                               ; @.str.8
	.asciz	"shutdown(SHUT_RDWR + 1) does not return EINVAL"

l_.str.9:                               ; @.str.9
	.asciz	"shutdown(SHUT_RD) for connect socket: %s"

	.comm	_SHUT_WR,8,3                    ; @SHUT_WR
l_.str.10:                              ; @.str.10
	.asciz	"shutdown(SHUT_WR) for connect socket: %s"

.subsections_via_symbols
