	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ktrgenio                       ## -- Begin function ktrgenio
	.p2align	4, 0x90
_ktrgenio:                              ## @ktrgenio
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	addl	$-16, %r14d
	movl	(%rdi), %esi
	movq	8(%rdi), %rax
	movq	_UIO_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	cmpl	$1, %r14d
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %ecx
	callq	_printf
	movq	_suppressdata@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_14
## %bb.1:
	movl	_ktrgenio.screenwidth(%rip), %edx
	testl	%edx, %edx
	jne	LBB0_7
## %bb.2:
	movq	_fancy@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fileno
	movq	_TIOCGWINSZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-32(%rbp), %rdx
	movl	%eax, %edi
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.4:
	movl	-32(%rbp), %edx
	cmpl	$8, %edx
	jg	LBB0_6
LBB0_5:
	movl	$80, %edx
LBB0_6:
	movl	%edx, _ktrgenio.screenwidth(%rip)
LBB0_7:
	addq	$16, %r15
	movq	_maxdata@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r14d
	movl	%r14d, %esi
	cmovgl	%eax, %esi
	testl	%eax, %eax
	cmovel	%r14d, %esi
	testl	%esi, %esi
	jle	LBB0_13
## %bb.8:
	movl	%esi, %eax
	xorl	%ecx, %ecx
	movl	$9729, %r8d                     ## imm = 0x2601
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rcx
	cmpq	%rax, %rcx
	jae	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r15,%rcx), %edi
	leal	-127(%rdi), %ebx
	cmpb	$-96, %bl
	ja	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpb	$13, %dil
	ja	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movzbl	%dil, %edi
	btq	%rdi, %r8
	jb	LBB0_12
LBB0_15:
	movq	%r15, %rdi
	callq	_hexdump
	jmp	LBB0_14
LBB0_13:
	movq	%r15, %rdi
	callq	_visdump
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_ktrgenio.screenwidth,4,2 ## @ktrgenio.screenwidth
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fd %d %s %d byte%s\n"

	.comm	_UIO_READ,8,3                   ## @UIO_READ
L_.str.1:                               ## @.str.1
	.asciz	"read"

L_.str.2:                               ## @.str.2
	.asciz	"wrote"

L_.str.3:                               ## @.str.3
	.space	1

L_.str.4:                               ## @.str.4
	.asciz	"s"

	.comm	_suppressdata,8,3               ## @suppressdata
	.comm	_fancy,8,3                      ## @fancy
	.comm	_stderr,4,2                     ## @stderr
	.comm	_TIOCGWINSZ,4,2                 ## @TIOCGWINSZ
	.comm	_maxdata,4,2                    ## @maxdata
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ktrgenio                       ; -- Begin function ktrgenio
	.p2align	2
_ktrgenio:                              ; @ktrgenio
	.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	x20, x0
	sub	w19, w1, #16
	ldr	w1, [x0]
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _UIO_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _UIO_READ@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, l_.str.2@PAGE
Lloh4:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh5:
	adrp	x11, l_.str.1@PAGE
Lloh6:
	add	x11, x11, l_.str.1@PAGEOFF
	cmp	x8, x9
	csel	x2, x11, x10, eq
Lloh7:
	adrp	x8, l_.str.4@PAGE
Lloh8:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh9:
	adrp	x9, l_.str.3@PAGE
Lloh10:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w19, #1
	csel	x4, x9, x8, eq
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x3, x19
	bl	_printf
Lloh13:
	adrp	x8, _suppressdata@GOTPAGE
Lloh14:
	ldr	x8, [x8, _suppressdata@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cbnz	x8, LBB0_13
; %bb.1:
	adrp	x21, _ktrgenio.screenwidth@PAGE
	ldr	w2, [x21, _ktrgenio.screenwidth@PAGEOFF]
	cbnz	w2, LBB0_6
; %bb.2:
Lloh16:
	adrp	x8, _fancy@GOTPAGE
Lloh17:
	ldr	x8, [x8, _fancy@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh19:
	adrp	x8, _stderr@GOTPAGE
Lloh20:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_fileno
Lloh22:
	adrp	x8, _TIOCGWINSZ@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TIOCGWINSZ@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	ldr	w2, [sp, #8]
	cmn	w0, #1
	ccmp	w2, #8, #4, ne
	b.gt	LBB0_5
LBB0_4:
	mov	w2, #80
LBB0_5:
	str	w2, [x21, _ktrgenio.screenwidth@PAGEOFF]
LBB0_6:
Lloh25:
	adrp	x8, _maxdata@GOTPAGE
Lloh26:
	ldr	x8, [x8, _maxdata@GOTPAGEOFF]
	add	x0, x20, #16
Lloh27:
	ldr	w8, [x8]
	cmp	w19, w8
	ccmp	w8, #0, #4, gt
	csel	w1, w8, w19, ne
	cmp	w1, #1
	b.lt	LBB0_12
; %bb.7:
	mov	x8, #0
	mov	w9, #1
	mov	w10, #9729
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x8, #1
	cmp	x8, x1
	b.hs	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x0, x8]
	sub	w12, w11, #127
	cmn	w12, #96
	b.hi	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w11, #13
	lsl	w11, w9, w11
	and	w11, w11, w10
	ccmp	w11, #0, #4, ls
	b.ne	LBB0_8
; %bb.11:
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_hexdump
	b	LBB0_13
LBB0_12:
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_visdump
LBB0_13:
	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	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_ktrgenio.screenwidth,4,2 ; @ktrgenio.screenwidth
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fd %d %s %d byte%s\n"

	.comm	_UIO_READ,8,3                   ; @UIO_READ
l_.str.1:                               ; @.str.1
	.asciz	"read"

l_.str.2:                               ; @.str.2
	.asciz	"wrote"

l_.str.3:                               ; @.str.3
	.space	1

l_.str.4:                               ; @.str.4
	.asciz	"s"

	.comm	_suppressdata,8,3               ; @suppressdata
	.comm	_fancy,8,3                      ; @fancy
	.comm	_stderr,4,2                     ; @stderr
	.comm	_TIOCGWINSZ,4,2                 ; @TIOCGWINSZ
	.comm	_maxdata,4,2                    ; @maxdata
.subsections_via_symbols
