	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_comm_point_tcp_accept_callback ## -- Begin function comm_point_tcp_accept_callback
	.p2align	4, 0x90
_comm_point_tcp_accept_callback:        ## @comm_point_tcp_accept_callback
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movl	%edi, %r15d
	movq	(%rdx), %rax
	movq	_comm_tcp_accept@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_log_assert
	movq	_UB_EV_READ@GOTPCREL(%rip), %r12
	testw	%bx, (%r12)
	je	LBB0_14
## %bb.1:
	movq	56(%r14), %rax
	movq	8(%rax), %rdi
	callq	_ub_comm_base_now
	movq	24(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.4:
	movq	56(%rbx), %rax
	movl	(%rax), %edi
	callq	_ub_event_free
	movq	56(%rbx), %rax
	movq	8(%rax), %rax
	movq	_UB_EV_PERSIST@GOTPCREL(%rip), %rcx
	movzwl	(%r12), %edx
	orw	(%rcx), %dx
	movq	(%rax), %rax
	movq	_UB_EV_TIMEOUT@GOTPCREL(%rip), %rcx
	orw	(%rcx), %dx
	movl	(%rax), %edi
	movq	_comm_point_tcp_handle_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movswl	%dx, %edx
	movl	$-1, %esi
	movq	%rbx, %r8
	callq	_ub_event_new
	movq	56(%rbx), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	xorl	%edi, %edi
	cmpl	$-1, %r15d
	setne	%dil
	callq	_log_assert
	leaq	48(%rbx), %rsi
	leaq	44(%rbx), %rdx
	movq	%r14, %rdi
	callq	_comm_point_perform_accept
	cmpl	$-1, %eax
	je	LBB0_13
## %bb.7:
	movl	%eax, %r15d
	movq	32(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.8:
	movl	%r15d, %esi
	callq	_incoming_ssl_fd
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_15
## %bb.9:
	movq	_comm_ssl_shake_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
LBB0_10:
	movl	16(%r14), %edx
	incl	%edx
	movl	%edx, 16(%r14)
	movq	24(%rbx), %rax
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_comm_point_stop_listening
	movl	16(%r14), %edx
LBB0_12:
	movl	12(%r14), %ecx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_setup_tcp_handler              ## TAILCALL
LBB0_14:
	movswl	%bx, %esi
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_log_info                       ## TAILCALL
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_3
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_log_warn                       ## TAILCALL
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	%r15d, 8(%rbx)
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_comm_point_close               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_comm_tcp_accept,8,3            ## @comm_tcp_accept
	.comm	_UB_EV_READ,2,1                 ## @UB_EV_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ignoring tcp accept event %d"

L_.str.1:                               ## @.str.1
	.asciz	"accepted too many tcp, connections full"

	.comm	_UB_EV_PERSIST,2,1              ## @UB_EV_PERSIST
	.comm	_UB_EV_TIMEOUT,2,1              ## @UB_EV_TIMEOUT
	.comm	_comm_point_tcp_handle_callback,4,2 ## @comm_point_tcp_handle_callback
L_.str.2:                               ## @.str.2
	.asciz	"could not ub_event_new, dropped tcp"

	.comm	_comm_ssl_shake_read,4,2        ## @comm_ssl_shake_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_comm_point_tcp_accept_callback ; -- Begin function comm_point_tcp_accept_callback
	.p2align	2
_comm_point_tcp_accept_callback:        ; @comm_point_tcp_accept_callback
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x2]
Lloh0:
	adrp	x9, _comm_tcp_accept@GOTPAGE
Lloh1:
	ldr	x9, [x9, _comm_tcp_accept@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_log_assert
Lloh3:
	adrp	x22, _UB_EV_READ@GOTPAGE
Lloh4:
	ldr	x22, [x22, _UB_EV_READ@GOTPAGEOFF]
	ldrh	w8, [x22]
	and	w8, w8, w20
	tst	w8, #0xffff
	b.eq	LBB0_10
; %bb.1:
	ldr	x8, [x19, #56]
	ldr	x0, [x8, #8]
	bl	_ub_comm_base_now
	ldr	x20, [x19, #24]
	cbz	x20, LBB0_11
; %bb.2:
	ldr	x8, [x20, #56]
	ldr	w0, [x8]
	bl	_ub_event_free
	ldr	x8, [x20, #56]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _UB_EV_PERSIST@GOTPAGE
Lloh6:
	ldr	x9, [x9, _UB_EV_PERSIST@GOTPAGEOFF]
	ldr	w0, [x8]
	ldrh	w8, [x9]
	ldrh	w9, [x22]
	orr	w8, w9, w8
Lloh7:
	adrp	x9, _UB_EV_TIMEOUT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _UB_EV_TIMEOUT@GOTPAGEOFF]
	ldrh	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _comm_point_tcp_handle_callback@GOTPAGE
Lloh10:
	ldr	x9, [x9, _comm_point_tcp_handle_callback@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x9]
	sxth	w2, w8
	mov	w1, #-1
	mov	x4, x20
	bl	_ub_event_new
	ldr	x8, [x20, #56]
	str	w0, [x8]
	cbz	w0, LBB0_12
; %bb.3:
	cmn	w21, #1
	cset	w0, ne
	bl	_log_assert
	add	x1, x20, #48
	add	x2, x20, #44
	mov	x0, x19
	bl	_comm_point_perform_accept
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.4:
	mov	x21, x0
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_7
; %bb.5:
	mov	x1, x21
	bl	_incoming_ssl_fd
	str	x0, [x20, #32]
	cbz	x0, LBB0_15
; %bb.6:
Lloh12:
	adrp	x8, _comm_ssl_shake_read@GOTPAGE
Lloh13:
	ldr	x8, [x8, _comm_ssl_shake_read@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x20, #40]
LBB0_7:
	ldr	w8, [x19, #16]
	add	w2, w8, #1
	str	w2, [x19, #16]
	ldr	x8, [x20, #24]
	str	x8, [x19, #24]
	cbnz	x8, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_comm_point_stop_listening
	ldr	w2, [x19, #16]
LBB0_9:
	ldr	w3, [x19, #12]
	mov	x0, x20
	mov	x1, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_setup_tcp_handler
LBB0_10:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_log_info
LBB0_11:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_log_warn
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_15:
	str	w21, [x20, #8]
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_comm_point_close
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_comm_tcp_accept,8,3            ; @comm_tcp_accept
	.comm	_UB_EV_READ,2,1                 ; @UB_EV_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ignoring tcp accept event %d"

l_.str.1:                               ; @.str.1
	.asciz	"accepted too many tcp, connections full"

	.comm	_UB_EV_PERSIST,2,1              ; @UB_EV_PERSIST
	.comm	_UB_EV_TIMEOUT,2,1              ; @UB_EV_TIMEOUT
	.comm	_comm_point_tcp_handle_callback,4,2 ; @comm_point_tcp_handle_callback
l_.str.2:                               ; @.str.2
	.asciz	"could not ub_event_new, dropped tcp"

	.comm	_comm_ssl_shake_read,4,2        ; @comm_ssl_shake_read
.subsections_via_symbols
