	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function respondthread
_respondthread:                         ## @respondthread
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PUFFS_MSG_MAXSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_damtx@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_pthread_mutex_lock
	movq	_dafd@GOTPCREL(%rip), %r13
	movq	_dacv@GOTPCREL(%rip), %r12
	cmpl	$-1, (%r13)
	jne	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_pthread_cond_wait
	cmpl	$-1, (%r13)
	je	LBB0_1
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_pthread_mutex_unlock
	movl	(%r13), %eax
	movl	%eax, -64(%rbp)
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	$0, -56(%rbp)
	leaq	-64(%rbp), %rdi
	movl	$1, %esi
	movl	$10, %edx
	callq	_rump_sys_poll
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %edi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_rump_sys_read
	testq	%rax, %rax
	jle	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, (%rbx)
	movl	(%r13), %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_rump_sys_write
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_pthread_mutex_lock
	cmpl	$-1, (%r13)
	je	LBB0_1
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_PUFFS_MSG_MAXSIZE,4,2          ## @PUFFS_MSG_MAXSIZE
	.comm	_damtx,4,2                      ## @damtx
	.comm	_dafd,4,2                       ## @dafd
	.comm	_dacv,4,2                       ## @dacv
	.comm	_POLLIN,4,2                     ## @POLLIN
	.no_dead_strip	_respondthread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function respondthread
_respondthread:                         ; @respondthread
	.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
	sub	sp, sp, #32
Lloh0:
	adrp	x8, _PUFFS_MSG_MAXSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PUFFS_MSG_MAXSIZE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	mov	x9, x19
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x19, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
Lloh5:
	adrp	x21, _damtx@GOTPAGE
Lloh6:
	ldr	x21, [x21, _damtx@GOTPAGEOFF]
	mov	x0, x21
	bl	_pthread_mutex_lock
Lloh7:
	adrp	x23, _dafd@GOTPAGE
Lloh8:
	ldr	x23, [x23, _dafd@GOTPAGEOFF]
Lloh9:
	adrp	x22, _dacv@GOTPAGE
Lloh10:
	ldr	x22, [x22, _dacv@GOTPAGEOFF]
Lloh11:
	adrp	x24, _POLLIN@GOTPAGE
Lloh12:
	ldr	x24, [x24, _POLLIN@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_pthread_cond_wait
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	cmn	w8, #1
	b.eq	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_pthread_mutex_unlock
	ldr	w8, [x23]
	stur	w8, [x29, #-72]
	ldr	w8, [x24]
	stur	w8, [x29, #-56]
	stur	xzr, [x29, #-64]
	sub	x0, x29, #72
	mov	w1, #1
	mov	w2, #10
	bl	_rump_sys_poll
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x23]
	mov	x1, x20
	mov	x2, x19
	bl	_rump_sys_read
	cmp	x0, #0
	b.le	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x2, x0
	str	xzr, [x20]
	ldr	w0, [x23]
	mov	x1, x20
	bl	_rump_sys_write
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_pthread_mutex_lock
	b	LBB0_2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PUFFS_MSG_MAXSIZE,4,2          ; @PUFFS_MSG_MAXSIZE
	.comm	_damtx,4,2                      ; @damtx
	.comm	_dafd,4,2                       ; @dafd
	.comm	_dacv,4,2                       ; @dacv
	.comm	_POLLIN,4,2                     ; @POLLIN
	.no_dead_strip	_respondthread
.subsections_via_symbols
