	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function inq_canon
_inq_canon:                             ## @inq_canon
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 20(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movl	(%rdi), %r15d
	movl	4(%rdi), %ebx
	movq	_N_TTY_BUF_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	decl	%eax
	movl	%r15d, %r12d
	subl	%ebx, %r12d
	andl	%eax, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movl	(%r13), %eax
	decl	%eax
	andl	%eax, %ebx
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, %r15d
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	16(%r14), %esi
	movl	%ebx, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r14), %rax
	movslq	%ebx, %rcx
	movq	(%rax,%rcx,8), %rax
	xorl	%ecx, %ecx
	movq	___DISABLED_CHAR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%cl
	subl	%ecx, %r12d
	jmp	LBB0_6
LBB0_7:
	movslq	%r12d, %rax
	jmp	LBB0_8
LBB0_1:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_N_TTY_BUF_SIZE,4,2             ## @N_TTY_BUF_SIZE
	.comm	___DISABLED_CHAR,8,3            ## @__DISABLED_CHAR
	.no_dead_strip	_inq_canon
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function inq_canon
_inq_canon:                             ; @inq_canon
	.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
	ldr	w8, [x0, #20]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
	ldp	w22, w20, [x0]
Lloh0:
	adrp	x23, _N_TTY_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _N_TTY_BUF_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	sub	w8, w8, #1
	subs	w9, w22, w20
	and	w21, w8, w9
	b.ne	LBB0_5
LBB0_2:
	sxtw	x0, w21
	b	LBB0_4
LBB0_3:
	mov	x0, #0
LBB0_4:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh2:
	adrp	x24, ___DISABLED_CHAR@GOTPAGE
Lloh3:
	ldr	x24, [x24, ___DISABLED_CHAR@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w8, w20, #1
	ldr	w9, [x23]
	sub	w9, w9, #1
	and	w20, w9, w8
	cmp	w22, w20
	b.eq	LBB0_2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_test_bit
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, w20, sxtw #3]
	ldr	x9, [x24]
	cmp	x8, x9
	cset	w8, eq
	sub	w21, w21, w8
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_N_TTY_BUF_SIZE,4,2             ; @N_TTY_BUF_SIZE
	.comm	___DISABLED_CHAR,8,3            ; @__DISABLED_CHAR
	.no_dead_strip	_inq_canon
.subsections_via_symbols
