	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reset                          ## -- Begin function reset
	.p2align	4, 0x90
_reset:                                 ## @reset
	.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
	leaq	-36(%rbp), %r15
	movq	%r15, %rdi
	callq	_FD_ZERO
	movq	_cin@GOTPCREL(%rip), %rbx
	movq	_FD_SETSIZE@GOTPCREL(%rip), %r12
	leaq	L_.str(%rip), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_fileno
	cmpq	(%r12), %rax
	jl	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	movq	%r14, %rsi
	callq	_errx
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %edi
	callq	_fileno
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_FD_SET
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_empty
	testl	%eax, %eax
	js	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edi, %edi
	callq	_getreply
	jmp	LBB0_1
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
	movq	_code@GOTPCREL(%rip), %rax
	movl	$-1, (%rax)
	xorl	%edi, %edi
	callq	_lostpeer
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cin,4,2                        ## @cin
	.comm	_FD_SETSIZE,8,3                 ## @FD_SETSIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fd too large"

L_.str.1:                               ## @.str.1
	.asciz	"reset"

	.comm	_code,4,2                       ## @code
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reset                          ; -- Begin function reset
	.p2align	2
_reset:                                 ; @reset
	.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
	add	x0, sp, #12
	bl	_FD_ZERO
Lloh0:
	adrp	x20, _cin@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cin@GOTPAGEOFF]
Lloh2:
	adrp	x21, _FD_SETSIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _FD_SETSIZE@GOTPAGEOFF]
Lloh4:
	adrp	x19, l_.str@PAGE
Lloh5:
	add	x19, x19, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	bl	_fileno
	ldr	x8, [x21]
	cmp	x0, x8
	b.lt	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	mov	x1, x19
	bl	_errx
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x20]
	bl	_fileno
	add	x1, sp, #12
	bl	_FD_SET
	add	x0, sp, #12
	mov	w1, #0
	bl	_empty
	tbnz	w0, #31, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #0
	bl	_getreply
	b	LBB0_1
LBB0_6:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
Lloh8:
	adrp	x8, _code@GOTPAGE
Lloh9:
	ldr	x8, [x8, _code@GOTPAGEOFF]
	mov	w9, #-1
Lloh10:
	str	w9, [x8]
	mov	w0, #0
	bl	_lostpeer
LBB0_7:
	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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_cin,4,2                        ; @cin
	.comm	_FD_SETSIZE,8,3                 ; @FD_SETSIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fd too large"

l_.str.1:                               ; @.str.1
	.asciz	"reset"

	.comm	_code,4,2                       ; @code
.subsections_via_symbols
