	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfb_wr_thr
_rfb_wr_thr:                            ## @rfb_wr_thr
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %ebx
	movq	$0, -48(%rbp)
	movl	$0, -56(%rbp)
	testl	%ebx, %ebx
	js	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	leal	1(%rbx), %r15d
	leaq	-76(%rbp), %r12
	leaq	-72(%rbp), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$40000, %edi                    ## imm = 0x9C40
	subl	%eax, %edi
	callq	_usleep
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, (%r14)
	js	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_FD_ZERO
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_FD_SET
	movq	$0, -64(%rbp)
	movl	$10000, -72(%rbp)               ## imm = 0x2710
	movl	%r15d, %edi
	movq	%r12, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r13, %r8
	callq	_select
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_gettimeofday
	leaq	-56(%rbp), %rdi
	movq	%r13, %rsi
	callq	_timeval_delta
	cmpl	$40001, %eax                    ## imm = 0x9C41
	jl	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	-72(%rbp), %eax
	movl	%eax, -56(%rbp)
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_rfb_send_screen
	testq	%rax, %rax
	jg	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_rfb_wr_thr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfb_wr_thr
_rfb_wr_thr:                            ; @rfb_wr_thr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	w20, [x0]
	str	xzr, [sp, #16]
	str	wzr, [sp, #8]
	tbnz	w20, #31, LBB0_7
; %bb.1:
	mov	x19, x0
	add	w21, w20, #1
	mov	w22, #10000
	mov	w23, #40001
	mov	w24, #40000
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	w0, w24, w0
	bl	_usleep
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	tbnz	w8, #31, LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #44
	bl	_FD_ZERO
	add	x1, sp, #44
	mov	x0, x20
	bl	_FD_SET
	str	xzr, [sp, #32]
	str	w22, [sp, #24]
	add	x1, sp, #44
	add	x4, sp, #24
	mov	x0, x21
	mov	x2, #0
	mov	x3, #0
	bl	_select
	tbnz	w0, #31, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #24
	mov	x1, #0
	bl	_gettimeofday
	add	x0, sp, #8
	add	x1, sp, #24
	bl	_timeval_delta
	cmp	w0, w23
	b.lt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #32]
	str	x8, [sp, #16]
	ldr	w8, [sp, #24]
	str	w8, [sp, #8]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_rfb_send_screen
	cmp	x0, #1
	b.ge	LBB0_3
LBB0_7:
	mov	x0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_rfb_wr_thr
.subsections_via_symbols
