	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_comm_point_start_listening     ## -- Begin function comm_point_start_listening
	.p2align	4, 0x90
_comm_point_start_listening:            ## @comm_point_start_listening
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_VERB_ALGO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	cmpl	$-1, %edx
	cmovel	%esi, %edx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %ecx
	callq	_verbose
	movq	8(%rbx), %rax
	movq	_comm_tcp_accept@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	cmpl	$0, 40(%rbx)
	je	LBB0_20
LBB0_2:
	leal	-1(%r14), %ecx
	cmpl	$-3, %ecx
	ja	LBB0_7
## %bb.3:
	cmpq	$0, 16(%rbx)
	jne	LBB0_6
## %bb.4:
	movl	$8, %edi
	callq	_malloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_5
LBB0_6:
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	movq	_UB_EV_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ub_event_add_bits
	movq	16(%rbx), %rax
	movslq	%r14d, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movl	%ecx, (%rax)
	imull	$1000, %ecx, %ecx               ## imm = 0x3E8
	movl	%r14d, %edx
	subl	%ecx, %edx
	imull	$1000, %edx, %ecx               ## imm = 0x3E8
	movl	%ecx, 4(%rax)
	movq	8(%rbx), %rax
LBB0_7:
	movq	_comm_tcp@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.8:
	movq	_comm_http@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_9:
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	movq	_UB_EV_READ@GOTPCREL(%rip), %r12
	movq	_UB_EV_WRITE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	orl	(%r12), %esi
	callq	_ub_event_del_bits
	cmpq	$0, 32(%rbx)
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	cmoveq	%r13, %r12
	movl	(%r12), %esi
	callq	_ub_event_add_bits
LBB0_10:
	cmpl	$-1, %r15d
	je	LBB0_14
## %bb.11:
	movl	(%rbx), %edi
	cmpl	$-1, %edi
	je	LBB0_13
## %bb.12:
	callq	_close
LBB0_13:
	movl	%r15d, (%rbx)
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_ub_event_set_fd
LBB0_14:
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	testl	%r14d, %r14d
	je	LBB0_15
## %bb.16:
	movq	16(%rbx), %rsi
	jmp	LBB0_17
LBB0_15:
	xorl	%esi, %esi
LBB0_17:
	callq	_ub_event_add
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	leaq	L_.str.2(%rip), %rdi
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_log_err                        ## TAILCALL
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_VERB_ALGO,4,2                  ## @VERB_ALGO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"comm point start listening %d (%d msec)"

	.comm	_comm_tcp_accept,8,3            ## @comm_tcp_accept
L_.str.1:                               ## @.str.1
	.asciz	"cpsl: malloc failed. No net read."

	.comm	_UB_EV_TIMEOUT,4,2              ## @UB_EV_TIMEOUT
	.comm	_comm_tcp,8,3                   ## @comm_tcp
	.comm	_comm_http,8,3                  ## @comm_http
	.comm	_UB_EV_READ,4,2                 ## @UB_EV_READ
	.comm	_UB_EV_WRITE,4,2                ## @UB_EV_WRITE
L_.str.2:                               ## @.str.2
	.asciz	"event_add failed. in cpsl."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_comm_point_start_listening     ; -- Begin function comm_point_start_listening
	.p2align	2
_comm_point_start_listening:            ; @comm_point_start_listening
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _VERB_ALGO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VERB_ALGO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w8, [x19]
	cmn	w8, #1
	csel	w2, w1, w8, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_verbose
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, _comm_tcp_accept@GOTPAGE
Lloh6:
	ldr	x9, [x9, _comm_tcp_accept@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w9, [x19, #40]
	cbz	w9, LBB0_17
LBB0_2:
	sub	w9, w20, #1
	cmn	w9, #3
	b.hi	LBB0_6
; %bb.3:
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_5
; %bb.4:
	mov	w0, #8
	bl	_malloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_18
LBB0_5:
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _UB_EV_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _UB_EV_TIMEOUT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_ub_event_add_bits
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w20, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w9, w8, w9
	mov	w10, #1000
	msub	w11, w9, w10, w20
	ldp	x8, x12, [x19, #8]
	mul	w10, w11, w10
	stp	w9, w10, [x12]
LBB0_6:
Lloh11:
	adrp	x9, _comm_tcp@GOTPAGE
Lloh12:
	ldr	x9, [x9, _comm_tcp@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
Lloh14:
	adrp	x10, _comm_http@GOTPAGE
Lloh15:
	ldr	x10, [x10, _comm_http@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x19, #24]
Lloh17:
	adrp	x22, _UB_EV_READ@GOTPAGE
Lloh18:
	ldr	x22, [x22, _UB_EV_READ@GOTPAGEOFF]
	ldr	w0, [x8]
	ldr	w8, [x22]
Lloh19:
	adrp	x23, _UB_EV_WRITE@GOTPAGE
Lloh20:
	ldr	x23, [x23, _UB_EV_WRITE@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w1, w9, w8
	bl	_ub_event_del_bits
	ldp	x9, x8, [x19, #24]
	ldr	w0, [x9]
	cmp	x8, #0
	csel	x8, x23, x22, eq
	ldr	w1, [x8]
	bl	_ub_event_add_bits
LBB0_8:
	cmn	w21, #1
	b.eq	LBB0_12
; %bb.9:
	ldr	w0, [x19]
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.10:
	bl	_close
LBB0_11:
	str	w21, [x19]
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	mov	x1, x21
	bl	_ub_event_set_fd
LBB0_12:
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	cbz	w20, LBB0_16
; %bb.13:
	ldr	x1, [x19, #16]
	bl	_ub_event_add
	cbz	x0, LBB0_17
LBB0_14:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_15:
	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
	b	_log_err
LBB0_16:
	mov	x1, #0
	bl	_ub_event_add
	cbnz	x0, LBB0_14
LBB0_17:
	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_18:
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_VERB_ALGO,4,2                  ; @VERB_ALGO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"comm point start listening %d (%d msec)"

	.comm	_comm_tcp_accept,8,3            ; @comm_tcp_accept
l_.str.1:                               ; @.str.1
	.asciz	"cpsl: malloc failed. No net read."

	.comm	_UB_EV_TIMEOUT,4,2              ; @UB_EV_TIMEOUT
	.comm	_comm_tcp,8,3                   ; @comm_tcp
	.comm	_comm_http,8,3                  ; @comm_http
	.comm	_UB_EV_READ,4,2                 ; @UB_EV_READ
	.comm	_UB_EV_WRITE,4,2                ; @UB_EV_WRITE
l_.str.2:                               ; @.str.2
	.asciz	"event_add failed. in cpsl."

.subsections_via_symbols
