	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dconschat_read_socket
_dconschat_read_socket:                 ## @dconschat_read_socket
	.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, %r13
	movq	%rdi, %r14
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_XFER@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movl	(%r15), %eax
	addl	$2, %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movl	(%r13), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_read
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	movl	$0, -56(%rbp)
	leaq	-56(%rbp), %r9
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movl	%eax, %ecx
	movq	%r15, %r8
	callq	_dconschat_read_filter
	movl	-56(%rbp), %ecx
	testl	%ecx, %ecx
	jle	LBB0_12
## %bb.2:
	movq	_F_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_12
## %bb.3:
	movl	12(%r13), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_dconschat_write_dcons
	movq	_verbose@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$2, %eax
	jl	LBB0_5
## %bb.4:
	movslq	-56(%rbp), %rax
	movb	$0, (%r15,%rax)
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_12
LBB0_7:
	movq	_verbose@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_11
## %bb.8:
	movl	12(%r13), %esi
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	callq	_warn
	jmp	LBB0_11
LBB0_5:
	cmpl	$1, %eax
	jne	LBB0_12
## %bb.6:
	movl	-56(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	callq	_warnx
LBB0_11:
	movl	(%r13), %esi
	movq	_EVFILT_READ@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	_EV_DELETE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	subq	$8, %rsp
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	callq	_EV_SET
	addq	$16, %rsp
	movl	8(%r14), %edi
	leaq	4(%r14), %r12
	movq	%r15, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%r12, %r9
	callq	_kevent
	movl	(%r13), %edi
	callq	_close
	movl	4(%r13), %edi
	callq	_close
	movl	8(%r13), %esi
	movl	(%rbx), %edx
	movq	_EV_ADD@GOTPCREL(%rip), %rax
	movq	_EV_ONESHOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	subq	$8, %rsp
	movq	%r15, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r13
	callq	_EV_SET
	addq	$16, %rsp
	movl	8(%r14), %edi
	movq	%r15, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%r12, %r9
	callq	_kevent
	movq	$-1, (%r13)
LBB0_12:
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_XFER,4,2                   ## @MAX_XFER
	.comm	_F_READY,4,2                    ## @F_READY
	.comm	_verbose,4,2                    ## @verbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-> %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"(%d)"

	.comm	_stdout,4,2                     ## @stdout
L_.str.2:                               ## @.str.2
	.asciz	"port%d: closed"

L_.str.3:                               ## @.str.3
	.asciz	"port%d: read"

	.comm	_EVFILT_READ,4,2                ## @EVFILT_READ
	.comm	_EV_DELETE,4,2                  ## @EV_DELETE
	.comm	_EV_ADD,4,2                     ## @EV_ADD
	.comm	_EV_ONESHOT,4,2                 ## @EV_ONESHOT
	.no_dead_strip	_dconschat_read_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dconschat_read_socket
_dconschat_read_socket:                 ; @dconschat_read_socket
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #16
	mov	x19, x1
	mov	x20, x0
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MAX_XFER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_XFER@GOTPAGEOFF]
	ldr	w2, [x8]
	mov	x9, x2
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x2, #15
	and	x10, x10, #0x1fffffff0
	sub	x22, x9, x10
	mov	sp, x22
	ldr	w8, [x8]
	add	w8, w8, #2
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	w0, [x1]
	mov	x1, x22
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_read
	mov	x3, x0
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	stur	wzr, [x29, #-64]
	sub	x5, x29, #64
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	mov	x4, x21
	bl	_dconschat_read_filter
	ldur	w3, [x29, #-64]
	cmp	w3, #1
	b.lt	LBB0_12
; %bb.2:
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _F_READY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _F_READY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.3:
	ldr	w1, [x19, #12]
	mov	x0, x20
	mov	x2, x21
	bl	_dconschat_write_dcons
Lloh12:
	adrp	x8, _verbose@GOTPAGE
Lloh13:
	ldr	x8, [x8, _verbose@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_8
; %bb.4:
	ldursw	x8, [x29, #-64]
	strb	wzr, [x21, x8]
	str	x21, [sp, #-16]!
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	add	sp, sp, #16
	b	LBB0_12
LBB0_5:
Lloh17:
	adrp	x8, _verbose@GOTPAGE
Lloh18:
	ldr	x8, [x8, _verbose@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cbz	w8, LBB0_11
; %bb.6:
	ldr	w1, [x19, #12]
	cbz	w3, LBB0_10
; %bb.7:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_warn
	b	LBB0_11
LBB0_8:
	cmp	w8, #1
	b.ne	LBB0_12
; %bb.9:
	ldur	w8, [x29, #-64]
	str	x8, [sp, #-16]!
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	add	sp, sp, #16
Lloh24:
	adrp	x8, _stdout@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_fflush
	b	LBB0_12
LBB0_10:
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warnx
LBB0_11:
	ldr	w1, [x19]
Lloh29:
	adrp	x22, _EVFILT_READ@GOTPAGE
Lloh30:
	ldr	x22, [x22, _EVFILT_READ@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh31:
	adrp	x8, _EV_DELETE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EV_DELETE@GOTPAGEOFF]
Lloh33:
	ldr	w3, [x8]
	sub	x0, x29, #64
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	bl	_EV_SET
	ldr	w0, [x20, #8]
	add	x21, x20, #4
	sub	x1, x29, #64
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	mov	x5, x21
	bl	_kevent
	ldr	w0, [x19]
	bl	_close
	ldr	w0, [x19, #4]
	bl	_close
	ldr	w1, [x19, #8]
Lloh34:
	adrp	x8, _EV_ADD@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EV_ADD@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _EV_ONESHOT@GOTPAGE
Lloh38:
	ldr	x9, [x9, _EV_ONESHOT@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w3, w9, w8
	sub	x0, x29, #64
	mov	w4, #0
	mov	w5, #0
	mov	x6, x19
	bl	_EV_SET
	ldr	w0, [x20, #8]
	sub	x1, x29, #64
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	mov	x5, x21
	bl	_kevent
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x19]
LBB0_12:
	mov	sp, x23
	ldur	x8, [x29, #-56]
Lloh40:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh41:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	w0, #0
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_XFER,4,2                   ; @MAX_XFER
	.comm	_F_READY,4,2                    ; @F_READY
	.comm	_verbose,4,2                    ; @verbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-> %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"(%d)"

	.comm	_stdout,4,2                     ; @stdout
l_.str.2:                               ; @.str.2
	.asciz	"port%d: closed"

l_.str.3:                               ; @.str.3
	.asciz	"port%d: read"

	.comm	_EVFILT_READ,4,2                ; @EVFILT_READ
	.comm	_EV_DELETE,4,2                  ; @EV_DELETE
	.comm	_EV_ADD,4,2                     ; @EV_ADD
	.comm	_EV_ONESHOT,4,2                 ; @EV_ONESHOT
	.no_dead_strip	_dconschat_read_socket
.subsections_via_symbols
