	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	%edi, %r15d
	movq	_buflen@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	cmpl	$3, %r15d
	jne	LBB0_17
## %bb.1:
	movq	8(%rbx), %rdi
	callq	_atoi
	movl	%eax, %r15d
	movq	16(%rbx), %rdi
	callq	_atoi
	movl	%eax, -44(%rbp)
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_3
## %bb.2:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_3:
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	$16, -64(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movl	%r15d, %edi
	callq	_htons
	movl	%eax, -56(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movl	-64(%rbp), %edx
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	_bind
	testq	%rax, %rax
	jns	LBB0_5
## %bb.4:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_err
LBB0_5:
	movl	%r12d, %edi
	movl	$5, %esi
	callq	_listen
	testq	%rax, %rax
	jns	LBB0_7
## %bb.6:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_7:
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_USER_COOKIE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	-44(%rbp), %rcx
	movl	%r12d, %edi
	movl	$4, %r8d
	callq	_setsockopt
	testl	%eax, %eax
	jns	LBB0_9
## %bb.8:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_9:
	leaq	-44(%rbp), %rbx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%r13d, %edi
	callq	_close
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movl	%r13d, %edi
	movq	%rbx, %rcx
	movl	$4, %r8d
	callq	_setsockopt
	testl	%eax, %eax
	jns	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_buflen@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %edi
	movq	%r14, %rsi
	callq	_read
	testl	%eax, %eax
	jns	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	leaq	L_.str.6(%rip), %rdi
	callq	_warn
	jmp	LBB0_16
LBB0_17:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movl	$2, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_buflen,4,2                     ## @buflen
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Usage: %s port cookie\n"

	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
L_.str.1:                               ## @.str.1
	.asciz	"socket"

	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_EX_OSERR,4,2                   ## @EX_OSERR
L_.str.2:                               ## @.str.2
	.asciz	"failed to bind to port %d"

L_.str.3:                               ## @.str.3
	.asciz	"failed to listen on socket"

	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_USER_COOKIE,4,2             ## @SO_USER_COOKIE
L_.str.4:                               ## @.str.4
	.asciz	"setsockopt(SO_USER_COOKIE)"

L_.str.5:                               ## @.str.5
	.asciz	"accept failed"

L_.str.6:                               ## @.str.6
	.asciz	"failed read"

.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	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #32
	mov	x20, x1
Lloh0:
	adrp	x25, _buflen@GOTPAGE
Lloh1:
	ldr	x25, [x25, _buflen@GOTPAGEOFF]
	ldr	w8, [x25]
	mov	x9, x8
Lloh2:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh3:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
	cmp	w0, #3
	b.ne	LBB0_17
; %bb.1:
	ldr	x0, [x20, #8]
	bl	_atoi
	mov	x21, x0
	ldr	x0, [x20, #16]
	bl	_atoi
	stur	w0, [x29, #-100]
Lloh4:
	adrp	x8, _PF_INET@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x20, x0
	tbz	w0, #31, LBB0_3
; %bb.2:
Lloh10:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
LBB0_3:
	mov	w22, #16
	sub	x0, x29, #96
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh15:
	adrp	x8, _AF_INET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	stur	w22, [x29, #-96]
	stur	w8, [x29, #-84]
	mov	x0, x21
	bl	_htons
Lloh18:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	stp	w8, w0, [x29, #-92]
	ldur	w2, [x29, #-96]
	sub	x1, x29, #96
	mov	x0, x20
	bl	_bind
Lloh21:
	adrp	x26, _EX_OSERR@GOTPAGE
Lloh22:
	ldr	x26, [x26, _EX_OSERR@GOTPAGEOFF]
	tbz	x0, #63, LBB0_5
; %bb.4:
	ldr	w0, [x26]
	str	x21, [sp, #-16]!
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_err
	add	sp, sp, #16
LBB0_5:
	mov	x0, x20
	mov	w1, #5
	bl	_listen
	tbz	x0, #63, LBB0_7
; %bb.6:
	ldr	w0, [x26]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_err
LBB0_7:
Lloh27:
	adrp	x27, _SOL_SOCKET@GOTPAGE
Lloh28:
	ldr	x27, [x27, _SOL_SOCKET@GOTPAGEOFF]
	ldr	w1, [x27]
Lloh29:
	adrp	x28, _SO_USER_COOKIE@GOTPAGE
Lloh30:
	ldr	x28, [x28, _SO_USER_COOKIE@GOTPAGEOFF]
	ldr	w2, [x28]
	sub	x3, x29, #100
	mov	x0, x20
	mov	w4, #4
	bl	_setsockopt
	tbz	w0, #31, LBB0_9
; %bb.8:
	ldr	w0, [x26]
Lloh31:
	adrp	x1, l_.str.4@PAGE
Lloh32:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_err
LBB0_9:
Lloh33:
	adrp	x21, l_.str.5@PAGE
Lloh34:
	add	x21, x21, l_.str.5@PAGEOFF
Lloh35:
	adrp	x22, l_.str.4@PAGE
Lloh36:
	add	x22, x22, l_.str.4@PAGEOFF
Lloh37:
	adrp	x23, l_.str.6@PAGE
Lloh38:
	add	x23, x23, l_.str.6@PAGEOFF
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x24
	bl	_close
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, #0
	mov	w2, #0
	bl	_accept
	mov	x24, x0
	tbz	w0, #31, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x26]
	mov	x1, x21
	bl	_err
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w1, [x27]
	ldr	w2, [x28]
	sub	x3, x29, #100
	mov	x0, x24
	mov	w4, #4
	bl	_setsockopt
	tbz	w0, #31, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x26]
	mov	x1, x22
	bl	_err
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w2, [x25]
	mov	x0, x24
	mov	x1, x19
	bl	_read
	tbz	w0, #31, LBB0_10
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x23
	bl	_warn
	b	LBB0_10
LBB0_17:
Lloh39:
	adrp	x8, _stderr@GOTPAGE
Lloh40:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
	ldr	x2, [x20]
Lloh42:
	adrp	x1, l_.str@PAGE
Lloh43:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w0, #2
	bl	_exit
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_buflen,4,2                     ; @buflen
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Usage: %s port cookie\n"

	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
l_.str.1:                               ; @.str.1
	.asciz	"socket"

	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_EX_OSERR,4,2                   ; @EX_OSERR
l_.str.2:                               ; @.str.2
	.asciz	"failed to bind to port %d"

l_.str.3:                               ; @.str.3
	.asciz	"failed to listen on socket"

	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_USER_COOKIE,4,2             ; @SO_USER_COOKIE
l_.str.4:                               ; @.str.4
	.asciz	"setsockopt(SO_USER_COOKIE)"

l_.str.5:                               ; @.str.5
	.asciz	"accept failed"

l_.str.6:                               ; @.str.6
	.asciz	"failed read"

.subsections_via_symbols
