	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_io                          ## -- Begin function do_io
	.p2align	4, 0x90
_do_io:                                 ## @do_io
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BUFFERLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	leaq	-68(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_FD_ZERO
	movq	_lfd@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_FD_SET
	movq	_nfd@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_FD_SET
	movl	(%r12), %edx
	movl	(%r13), %ecx
	cmpl	%edx, %ecx
	movl	%edx, %r15d
	cmovgl	%ecx, %r15d
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_debug
	movq	_terminate@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_17
## %bb.1:
	incl	%r15d
	leaq	-56(%rbp), %rbx
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	cmpl	$130, (%rax)
	jne	LBB0_4
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_terminate@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_17
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	-68(%rbp), %eax
	movl	%eax, -56(%rbp)
	movl	%r15d, %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_select
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_FD_ISSET
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %r15
	movq	%r14, %rbx
	movq	%r13, %r12
	movl	(%r13), %edi
	movslq	-52(%rbp), %rax                 ## 4-byte Folded Reload
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	leaq	(%rax,%r13), %rsi
	movq	_BUFFERLEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	subl	%eax, %edx
	callq	_read
	movl	%eax, %r14d
	movl	$3, %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_debug
	testl	%r14d, %r14d
	jle	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, -64(%rbp)
	movl	%r14d, %edi
	movq	%r13, %rsi
	leaq	-64(%rbp), %rdx
	callq	_do_kbuff
	cmpl	$128, %eax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	cmpl	$129, %eax
	movq	%rbx, %r14
	movq	%r12, %r13
	movq	%r15, %r12
	movl	-60(%rbp), %r15d                ## 4-byte Reload
	leaq	-56(%rbp), %rbx
	jne	LBB0_12
	jmp	LBB0_17
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	addl	-64(%rbp), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%rbx, %r14
	movq	%r12, %r13
	movq	%r15, %r12
	movl	-60(%rbp), %r15d                ## 4-byte Reload
	leaq	-56(%rbp), %rbx
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_FD_ISSET
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	movq	%r14, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%ecx, %ecx
	callq	_recv
	movl	%eax, %ebx
	movl	$3, %edi
	leaq	L_.str.6(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_debug
	testl	%ebx, %ebx
	jle	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_do_packet
	cmpl	$129, %eax
	leaq	-56(%rbp), %rbx
	jne	LBB0_16
	jmp	LBB0_17
LBB0_7:
	leaq	L_.str.5(%rip), %rbx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_8
LBB0_14:
	leaq	L_.str.7(%rip), %rsi
	leaq	L_.str.8(%rip), %rbx
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rbx
LBB0_8:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_syslog
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STRERROR
	movl	$1, %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_debug
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFFERLEN,4,2                  ## @BUFFERLEN
	.comm	_lfd,4,2                        ## @lfd
	.comm	_nfd,4,2                        ## @nfd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nfd %d lfd %d maxfd %d\n"

	.comm	_terminate,4,2                  ## @terminate
	.comm	_errno,4,2                      ## @errno
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
L_.str.1:                               ## @.str.1
	.asciz	"select error: %m"

L_.str.2:                               ## @.str.2
	.asciz	"select error: %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"read(K):%d\n"

L_.str.4:                               ## @.str.4
	.asciz	"read error (k-header): %m"

L_.str.5:                               ## @.str.5
	.asciz	"read error (k-header): %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"read(N):%d\n"

L_.str.7:                               ## @.str.7
	.asciz	"read error (n-header): %m"

L_.str.8:                               ## @.str.8
	.asciz	"read error (n-header): %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_io                          ; -- Begin function do_io
	.p2align	2
_do_io:                                 ; @do_io
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x28, _BUFFERLEN@GOTPAGE
Lloh4:
	ldr	x28, [x28, _BUFFERLEN@GOTPAGEOFF]
	ldr	w19, [x28]
	mov	x9, x19
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x19, #15
	and	x12, x9, #0x1fffffff0
	sub	x20, x8, x12
	mov	sp, x20
	mov	x9, x19
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x21, x8, x12
	mov	sp, x21
	sub	x0, x29, #92
	bl	_FD_ZERO
Lloh9:
	adrp	x22, _lfd@GOTPAGE
Lloh10:
	ldr	x22, [x22, _lfd@GOTPAGEOFF]
	ldr	w0, [x22]
	sub	x1, x29, #92
	bl	_FD_SET
Lloh11:
	adrp	x23, _nfd@GOTPAGE
Lloh12:
	ldr	x23, [x23, _nfd@GOTPAGEOFF]
	ldr	w0, [x23]
	sub	x1, x29, #92
	bl	_FD_SET
	ldr	w2, [x23]
	ldr	w8, [x22]
	cmp	w8, w2
	csel	w24, w8, w2, gt
	stp	x8, x24, [sp, #-16]!
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_debug
	add	sp, sp, #16
Lloh15:
	adrp	x25, _terminate@GOTPAGE
Lloh16:
	ldr	x25, [x25, _terminate@GOTPAGEOFF]
	ldr	w8, [x25]
	cbnz	w8, LBB0_17
; %bb.1:
	mov	w26, #0
	add	w24, w24, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh17:
	adrp	x8, _errno@GOTPAGE
Lloh18:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, #130
	b.ne	LBB0_15
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x25]
	cbnz	w8, LBB0_17
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x29, #-92]
	stur	w8, [x29, #-96]
	sub	x1, x29, #96
	mov	x0, x24
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	bl	_select
	tbnz	w0, #31, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x22]
	sub	x1, x29, #96
	bl	_FD_ISSET
	cbz	x0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x22]
	add	x1, x21, w26, sxtw
	ldr	w8, [x28]
	sub	w2, w8, w26
	bl	_read
	mov	x27, x0
	mov	w0, #3
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x27
	bl	_debug
	cmp	w27, #1
	b.lt	LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	stur	wzr, [x29, #-100]
	sub	x2, x29, #100
	mov	x0, x27
	mov	x1, x21
	bl	_do_kbuff
	cmp	w0, #128
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w26, #0
	cmp	w0, #129
	b.ne	LBB0_10
	b	LBB0_17
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldur	w8, [x29, #-100]
	add	w26, w8, w26
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x23]
	sub	x1, x29, #96
	bl	_FD_ISSET
	cbz	x0, LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x23]
	mov	x1, x20
	mov	x2, x19
	mov	w3, #0
	bl	_recv
	mov	x27, x0
	mov	w0, #3
Lloh22:
	adrp	x1, l_.str.6@PAGE
Lloh23:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x2, x27
	bl	_debug
	cmp	w27, #1
	b.lt	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
	mov	x1, x20
	bl	_do_packet
	cmp	w0, #129
	b.ne	LBB0_3
	b	LBB0_17
LBB0_13:
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
Lloh26:
	adrp	x19, l_.str.5@PAGE
Lloh27:
	add	x19, x19, l_.str.5@PAGEOFF
	b	LBB0_16
LBB0_14:
Lloh28:
	adrp	x1, l_.str.7@PAGE
Lloh29:
	add	x1, x1, l_.str.7@PAGEOFF
Lloh30:
	adrp	x19, l_.str.8@PAGE
Lloh31:
	add	x19, x19, l_.str.8@PAGEOFF
	b	LBB0_16
LBB0_15:
Lloh32:
	adrp	x19, l_.str.2@PAGE
Lloh33:
	add	x19, x19, l_.str.2@PAGEOFF
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_16:
Lloh36:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	bl	_syslog
Lloh39:
	adrp	x8, _errno@GOTPAGE
Lloh40:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
	bl	_STRERROR
	mov	x2, x0
	mov	w0, #1
	mov	x1, x19
	bl	_debug
LBB0_17:
	ldur	x8, [x29, #-88]
Lloh42:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.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
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFFERLEN,4,2                  ; @BUFFERLEN
	.comm	_lfd,4,2                        ; @lfd
	.comm	_nfd,4,2                        ; @nfd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nfd %d lfd %d maxfd %d\n"

	.comm	_terminate,4,2                  ; @terminate
	.comm	_errno,4,2                      ; @errno
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
l_.str.1:                               ; @.str.1
	.asciz	"select error: %m"

l_.str.2:                               ; @.str.2
	.asciz	"select error: %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"read(K):%d\n"

l_.str.4:                               ; @.str.4
	.asciz	"read error (k-header): %m"

l_.str.5:                               ; @.str.5
	.asciz	"read error (k-header): %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"read(N):%d\n"

l_.str.7:                               ; @.str.7
	.asciz	"read error (n-header): %m"

l_.str.8:                               ; @.str.8
	.asciz	"read error (n-header): %s\n"

.subsections_via_symbols
