	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_tcp_handler
_setup_tcp_handler:                     ## @setup_tcp_handler
	.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
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_comm_tcp@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_log_assert
	xorl	%edi, %edi
	cmpl	$-1, 8(%rbx)
	sete	%dil
	callq	_log_assert
	movl	48(%rbx), %edi
	callq	_sldns_buffer_clear
	movl	$1, 12(%rbx)
	movq	$0, 24(%rbx)
	imull	$100, %r12d, %eax
	cltd
	idivl	%r15d
                                        ## kill: def $eax killed $eax def $rax
	leal	-51(%rax), %ecx
	cmpl	$14, %ecx
	ja	LBB0_3
## %bb.1:
	movslq	16(%rbx), %rax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	jmp	LBB0_2
LBB0_3:
	leal	-66(%rax), %ecx
	cmpl	$14, %ecx
	ja	LBB0_5
## %bb.4:
	movslq	16(%rbx), %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
LBB0_2:
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	movl	%eax, 16(%rbx)
LBB0_8:
	movq	_TCP_QUERY_TIMEOUT_MINIMUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpl	%edx, %eax
	cmovgl	%eax, %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_comm_point_start_listening     ## TAILCALL
LBB0_5:
	cmpl	$80, %eax
	jle	LBB0_6
## %bb.7:
	movl	$0, 16(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_6:
	movl	16(%rbx), %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_comm_tcp,8,3                   ## @comm_tcp
	.comm	_TCP_QUERY_TIMEOUT_MINIMUM,4,2  ## @TCP_QUERY_TIMEOUT_MINIMUM
	.no_dead_strip	_setup_tcp_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_tcp_handler
_setup_tcp_handler:                     ; @setup_tcp_handler
	.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	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _comm_tcp@GOTPAGE
Lloh1:
	ldr	x9, [x9, _comm_tcp@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_log_assert
	ldr	w8, [x20, #8]
	cmn	w8, #1
	cset	w0, eq
	bl	_log_assert
	ldr	w0, [x20, #48]
	bl	_sldns_buffer_clear
	mov	w8, #1
	str	w8, [x20, #12]
	str	xzr, [x20, #24]
	mov	w8, #100
	mul	w8, w22, w8
	sdiv	w8, w8, w21
	sub	w9, w8, #51
	cmp	w9, #14
	b.hi	LBB0_2
; %bb.1:
	ldrsw	x8, [x20, #16]
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	b	LBB0_4
LBB0_2:
	sub	w9, w8, #66
	cmp	w9, #14
	b.hi	LBB0_6
; %bb.3:
	ldrsw	x8, [x20, #16]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
LBB0_4:
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	str	w8, [x20, #16]
LBB0_5:
Lloh3:
	adrp	x9, _TCP_QUERY_TIMEOUT_MINIMUM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TCP_QUERY_TIMEOUT_MINIMUM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w2, w8, w9, gt
	mov	x0, x20
	mov	x1, x19
	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_start_listening
LBB0_6:
	cmp	w8, #80
	b.le	LBB0_8
; %bb.7:
	mov	w8, #0
	str	wzr, [x20, #16]
	b	LBB0_5
LBB0_8:
	ldr	w8, [x20, #16]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_comm_tcp,8,3                   ; @comm_tcp
	.comm	_TCP_QUERY_TIMEOUT_MINIMUM,4,2  ; @TCP_QUERY_TIMEOUT_MINIMUM
	.no_dead_strip	_setup_tcp_handler
.subsections_via_symbols
