	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LogicalTapeBackspace           ## -- Begin function LogicalTapeBackspace
	.p2align	4, 0x90
_LogicalTapeBackspace:                  ## @LogicalTapeBackspace
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r12
	xorl	%edi, %edi
	testl	%esi, %esi
	js	LBB0_2
## %bb.1:
	cmpl	%r14d, (%r12)
	setg	%dil
LBB0_2:
	callq	_Assert
	movq	8(%r12), %r15
	movslq	%r14d, %rbx
	shlq	$6, %rbx
	movl	(%r15,%rbx), %edi
	callq	_Assert
	movq	8(%r15,%rbx), %rax
	movq	_BLCKSZ@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movq	%rbx, %rax
	addq	%r15, %rbx
	addq	$16, %rbx
	movslq	16(%r15,%rax), %r14
	cmpq	-48(%rbp), %r14                 ## 8-byte Folded Reload
	jae	LBB0_8
## %bb.3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	addq	%rax, %r15
	addq	$48, %r15
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_TapeBlockPayloadSize@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, 8(%r15)
	movq	%rbx, -24(%r15)
	movq	(%r15), %rdi
	callq	_TapeBlockGetTrailer
	movq	8(%rax), %rax
	movq	%rax, -8(%r15)
	addq	(%r13), %r14
	cmpq	-48(%rbp), %r14                 ## 8-byte Folded Reload
	jae	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	callq	_TapeBlockGetTrailer
	movq	(%rax), %rbx
	cmpq	$-1, %rbx
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ltsReadBlock
	movq	(%r15), %rdi
	callq	_TapeBlockGetTrailer
	movq	8(%rax), %rax
	cmpq	-24(%r15), %rax
	je	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	(%r15), %rdi
	callq	_TapeBlockGetTrailer
	movq	8(%rax), %rcx
	movq	-24(%r15), %r8
	movl	%r13d, %edi
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_elog
	jmp	LBB0_4
LBB0_8:
	subl	-48(%rbp), %r14d                ## 4-byte Folded Reload
	movl	%r14d, %r15d
	jmp	LBB0_14
LBB0_9:
	subl	-48(%rbp), %r14d                ## 4-byte Folded Reload
	movl	%r14d, %r15d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_10:
	movq	-24(%r15), %rax
	xorl	%r15d, %r15d
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	cmpq	32(%rcx,%rdx), %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_13
## %bb.12:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_elog
LBB0_13:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
LBB0_14:
	movl	%r15d, (%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLCKSZ,8,3                     ## @BLCKSZ
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unexpected end of tape"

L_.str.1:                               ## @.str.1
	.asciz	"broken tape, next of block %ld is %ld, expected %ld"

	.comm	_TapeBlockPayloadSize,8,3       ## @TapeBlockPayloadSize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LogicalTapeBackspace           ; -- Begin function LogicalTapeBackspace
	.p2align	2
_LogicalTapeBackspace:                  ; @LogicalTapeBackspace
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	tbnz	w1, #31, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, w21
	cset	w0, gt
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_Assert
	ldr	x23, [x20, #8]
	sxtw	x24, w21
	add	x21, x23, x24, lsl #6
	ldr	w0, [x21]
	bl	_Assert
	ldr	x8, [x21, #8]
Lloh0:
	adrp	x9, _BLCKSZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BLCKSZ@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	mov	x22, x21
	ldrsw	x25, [x22, #16]!
	cmp	x25, x19
	b.hs	LBB0_9
; %bb.4:
	stp	x24, x23, [sp, #24]             ; 16-byte Folded Spill
	str	x22, [sp, #40]                  ; 8-byte Folded Spill
	add	x28, x21, #48
	add	x26, x21, #24
	add	x27, x21, #56
	add	x21, x21, #40
Lloh3:
	adrp	x24, _TapeBlockPayloadSize@GOTPAGE
Lloh4:
	ldr	x24, [x24, _TapeBlockPayloadSize@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x24]
	str	x8, [x27]
	str	x22, [x26]
	ldr	x0, [x28]
	bl	_TapeBlockGetTrailer
	ldr	x8, [x0, #8]
	str	x8, [x21]
	ldr	x8, [x24]
	add	x25, x8, x25
	cmp	x25, x19
	b.hs	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x28]
	bl	_TapeBlockGetTrailer
	ldr	x22, [x0]
	cmn	x22, #1
	b.eq	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x2, [x28]
	mov	x0, x20
	mov	x1, x22
	bl	_ltsReadBlock
	ldr	x0, [x28]
	bl	_TapeBlockGetTrailer
	ldr	x8, [x0, #8]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh5:
	adrp	x8, _ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
	ldr	x0, [x28]
	bl	_TapeBlockGetTrailer
	ldr	x8, [x0, #8]
	ldr	x9, [x26]
	stp	x8, x9, [sp, #8]
	str	x22, [sp]
	mov	x0, x23
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
	b	LBB0_5
LBB0_9:
	sub	w8, w25, w19
	b	LBB0_14
LBB0_10:
	sub	w8, w25, w19
	ldr	x22, [sp, #40]                  ; 8-byte Folded Reload
	b	LBB0_14
LBB0_11:
	ldr	x8, [x26]
	ldp	x10, x9, [sp, #24]              ; 16-byte Folded Reload
	add	x9, x9, x10, lsl #6
	ldr	x9, [x9, #32]
	cmp	x8, x9
	ldr	x22, [sp, #40]                  ; 8-byte Folded Reload
	b.eq	LBB0_13
; %bb.12:
Lloh10:
	adrp	x8, _ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_13:
	mov	w8, #0
	mov	x19, x25
LBB0_14:
	str	w8, [x22]
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_BLCKSZ,8,3                     ; @BLCKSZ
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unexpected end of tape"

l_.str.1:                               ; @.str.1
	.asciz	"broken tape, next of block %ld is %ld, expected %ld"

	.comm	_TapeBlockPayloadSize,8,3       ; @TapeBlockPayloadSize
.subsections_via_symbols
