	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfb_thr
_rfb_thr:                               ## @rfb_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	-36(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_sigemptyset
	movq	_SIGPIPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sigaddset
	movq	_SIG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_pthread_sigmask
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	leaq	24(%r12), %r14
	leaq	28(%r12), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_rfb_handle
	movl	%ebx, %edi
	callq	_close
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, (%r12)
	movl	$0, 8(%r12)
	movl	32(%r12), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	movl	%eax, %ebx
	cmpq	$0, 16(%r12)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movq	%r15, %rdi
	callq	_pthread_cond_signal
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	movq	$0, 16(%r12)
	jmp	LBB0_4
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_perror
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGPIPE,4,2                    ## @SIGPIPE
	.comm	_SIG_BLOCK,4,2                  ## @SIG_BLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pthread_sigmask"

	.no_dead_strip	_rfb_thr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfb_thr
_rfb_thr:                               ; @rfb_thr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	add	x0, sp, #12
	bl	_sigemptyset
Lloh0:
	adrp	x8, _SIGPIPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGPIPE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #12
	bl	_sigaddset
Lloh3:
	adrp	x8, _SIG_BLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIG_BLOCK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, sp, #12
	mov	x2, #0
	bl	_pthread_sigmask
	cbnz	x0, LBB0_5
; %bb.1:
	add	x20, x19, #24
	add	x21, x19, #28
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_rfb_handle
	mov	x0, x22
	bl	_close
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [x19]
	str	wzr, [x19, #8]
	ldr	w0, [x19, #32]
	mov	x1, #0
	mov	x2, #0
	bl	_accept
	mov	x22, x0
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_pthread_mutex_lock
	mov	x0, x21
	bl	_pthread_cond_signal
	mov	x0, x20
	bl	_pthread_mutex_unlock
	str	xzr, [x19, #16]
	b	LBB0_2
LBB0_5:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	mov	x0, #0
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGPIPE,4,2                    ; @SIGPIPE
	.comm	_SIG_BLOCK,4,2                  ; @SIG_BLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pthread_sigmask"

	.no_dead_strip	_rfb_thr
.subsections_via_symbols
