	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lex                            ## -- Begin function lex
	.p2align	4, 0x90
_lex:                                   ## @lex
	.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
	movq	%rdi, %r12
	movq	_enterhist@GOTPCREL(%rip), %r13
	movl	(%r13), %r15d
	movq	_histvalid@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_histline@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_postcmd_active@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_lineloc@GOTPCREL(%rip), %rdi
	callq	_btell
LBB0_2:
	movq	%r12, 8(%r12)
	movq	%r12, 16(%r12)
	movq	_STRNULL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	_hadhist@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	callq	_readc
	cmpb	$9, %al
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$32, %al
	je	LBB0_3
## %bb.5:
	movsbl	%al, %edi
	movq	_HISTSUB@GOTPCREL(%rip), %rax
	movsbl	(%rax), %eax
	cmpl	%edi, %eax
	jne	LBB0_8
## %bb.6:
	movq	_intty@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	callq	_getexcl
	jmp	LBB0_9
LBB0_8:
	callq	_unreadc
LBB0_9:
	movq	_lex_cleanup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_cleanup_push
	movl	$24, %edi
	callq	_xmalloc
	movq	%rax, %rbx
	movq	$0, (%rax)
	movq	%r12, 8(%rax)
	movq	%r12, 16(%rax)
	movq	%rax, 16(%r12)
	movq	%rax, 8(%r12)
	movl	%r15d, %edi
	callq	_word
	movq	%rax, (%rbx)
	cmpb	$10, (%rax)
	jne	LBB0_10
LBB0_16:
	movq	%r12, %rdi
	callq	_cleanup_ignore
	movq	%r12, %rdi
	callq	_cleanup_until
	movq	_histline@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_Strbuf_terminate
	movslq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	movq	8(%rbx), %rcx
	cmpb	$10, -1(%rax,%rcx)
	jne	LBB0_19
## %bb.18:
	movb	$0, -1(%rcx,%rax)
LBB0_19:
	movq	_histvalid@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_hadhist@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%r14d, %r14d
	cmpl	$0, (%r13)
	setne	%r14b
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%r14d, %r15d
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpb	$10, (%rax)
	movl	%r15d, %r14d
	je	LBB0_16
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %r15
	movl	$24, %edi
	callq	_xmalloc
	movq	%rax, %rbx
	movq	$0, (%rax)
	movq	%r15, 8(%rax)
	movq	%r12, 16(%rax)
	movq	%rax, 16(%r15)
	movq	%rax, 8(%r12)
	xorl	%edi, %edi
	callq	_word
	movq	%rax, (%rbx)
	cmpl	$0, (%r13)
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	leal	1(%r14), %r15d
	cmpl	$10241, %r14d                   ## imm = 0x2801
	jl	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_ERR_LTOOLONG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_stderror
	movq	(%rbx), %rax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_enterhist,4,2                  ## @enterhist
	.comm	_histvalid,4,2                  ## @histvalid
	.comm	_histline,16,3                  ## @histline
	.comm	_postcmd_active,4,2             ## @postcmd_active
	.comm	_lineloc,4,2                    ## @lineloc
	.comm	_STRNULL,8,3                    ## @STRNULL
	.comm	_hadhist,4,2                    ## @hadhist
	.comm	_HISTSUB,8,3                    ## @HISTSUB
	.comm	_intty,8,3                      ## @intty
	.comm	_lex_cleanup,4,2                ## @lex_cleanup
	.comm	_ERR_LTOOLONG,4,2               ## @ERR_LTOOLONG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lex                            ; -- Begin function lex
	.p2align	2
_lex:                                   ; @lex
	.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
	mov	x20, x0
Lloh0:
	adrp	x25, _enterhist@GOTPAGE
Lloh1:
	ldr	x25, [x25, _enterhist@GOTPAGEOFF]
	ldr	w21, [x25]
Lloh2:
	adrp	x23, _histvalid@GOTPAGE
Lloh3:
	ldr	x23, [x23, _histvalid@GOTPAGEOFF]
	str	wzr, [x23]
Lloh4:
	adrp	x19, _histline@GOTPAGE
Lloh5:
	ldr	x19, [x19, _histline@GOTPAGEOFF]
	str	wzr, [x19]
Lloh6:
	adrp	x8, _postcmd_active@GOTPAGE
Lloh7:
	ldr	x8, [x8, _postcmd_active@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cbnz	w8, LBB0_2
; %bb.1:
Lloh9:
	adrp	x0, _lineloc@GOTPAGE
Lloh10:
	ldr	x0, [x0, _lineloc@GOTPAGEOFF]
	bl	_btell
LBB0_2:
	str	x20, [x20, #16]
Lloh11:
	adrp	x8, _STRNULL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STRNULL@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	stp	x8, x20, [x20]
Lloh14:
	adrp	x24, _hadhist@GOTPAGE
Lloh15:
	ldr	x24, [x24, _hadhist@GOTPAGEOFF]
	str	wzr, [x24]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #0
	bl	_readc
	cmp	w0, #9
	b.eq	LBB0_3
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	and	w8, w0, #0xff
	cmp	w8, #32
	b.eq	LBB0_3
; %bb.5:
Lloh16:
	adrp	x8, _HISTSUB@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HISTSUB@GOTPAGEOFF]
Lloh18:
	ldrsb	w8, [x8]
Lloh19:
	adrp	x9, _intty@GOTPAGE
Lloh20:
	ldr	x9, [x9, _intty@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	w8, w0
	ccmp	x9, #0, #4, eq
	b.ne	LBB0_7
; %bb.6:
	bl	_unreadc
	b	LBB0_8
LBB0_7:
	bl	_getexcl
LBB0_8:
Lloh22:
	adrp	x8, _lex_cleanup@GOTPAGE
Lloh23:
	ldr	x8, [x8, _lex_cleanup@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_cleanup_push
	mov	w0, #24
	bl	_xmalloc
	mov	x22, x0
	stp	xzr, x20, [x0]
	str	x20, [x0, #16]
	stp	x0, x0, [x20, #8]
	mov	x0, x21
	bl	_word
	str	x0, [x22]
	ldrb	w8, [x0]
	cmp	w8, #10
	b.ne	LBB0_13
LBB0_9:
	mov	x0, x20
	bl	_cleanup_ignore
	mov	x0, x20
	bl	_cleanup_until
	mov	x0, x19
	bl	_Strbuf_terminate
	ldrsw	x9, [x19]
	cbz	w9, LBB0_12
; %bb.10:
	ldr	x8, [x19, #8]
	sub	x9, x9, #1
	ldrb	w10, [x8, x9]
	cmp	w10, #10
	b.ne	LBB0_12
; %bb.11:
	strb	wzr, [x8, x9]
LBB0_12:
	mov	w8, #1
	str	w8, [x23]
	ldr	w0, [x24]
	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_13:
	ldr	w8, [x25]
	cmp	w8, #0
	cset	w27, ne
	mov	w21, #10241
Lloh25:
	adrp	x26, _ERR_LTOOLONG@GOTPAGE
Lloh26:
	ldr	x26, [x26, _ERR_LTOOLONG@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x28, x27
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	ldrb	w8, [x0]
	mov	x27, x28
	cmp	w8, #10
	b.eq	LBB0_9
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	mov	x28, x22
	mov	w0, #24
	bl	_xmalloc
	mov	x22, x0
	stp	xzr, x28, [x0]
	str	x20, [x0, #16]
	str	x0, [x28, #16]
	str	x0, [x20, #8]
	mov	w0, #0
	bl	_word
	str	x0, [x22]
	ldr	w8, [x25]
	cbz	w8, LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	w28, w27, #1
	cmp	w27, w21
	b.lt	LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w0, [x26]
	bl	_stderror
	ldr	x0, [x22]
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_enterhist,4,2                  ; @enterhist
	.comm	_histvalid,4,2                  ; @histvalid
	.comm	_histline,16,3                  ; @histline
	.comm	_postcmd_active,4,2             ; @postcmd_active
	.comm	_lineloc,4,2                    ; @lineloc
	.comm	_STRNULL,8,3                    ; @STRNULL
	.comm	_hadhist,4,2                    ; @hadhist
	.comm	_HISTSUB,8,3                    ; @HISTSUB
	.comm	_intty,8,3                      ; @intty
	.comm	_lex_cleanup,4,2                ; @lex_cleanup
	.comm	_ERR_LTOOLONG,4,2               ; @ERR_LTOOLONG
.subsections_via_symbols
