	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LogicalTapeSeek                ## -- Begin function LogicalTapeSeek
	.p2align	4, 0x90
_LogicalTapeSeek:                       ## @LogicalTapeSeek
	.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
	movl	%ecx, %r12d
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r15
	xorl	%edi, %edi
	testl	%esi, %esi
	js	LBB0_2
## %bb.1:
	cmpl	%r13d, (%r15)
	setg	%dil
LBB0_2:
	callq	_Assert
	movq	8(%r15), %r14
	movslq	%r13d, %rax
	leaq	(%rax,%rax,2), %rbx
	shlq	$4, %rbx
	movl	(%r14,%rbx), %edi
	callq	_Assert
	testl	%r12d, %r12d
	setns	%al
	movq	_TapeBlockPayloadSize@GOTPCREL(%rip), %rcx
	cmpl	%r12d, (%rcx)
	setge	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_Assert
	movq	8(%r14,%rbx), %rax
	movq	_BLCKSZ@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, 16(%r14,%rbx)
	je	LBB0_4
## %bb.3:
	leaq	(%r14,%rbx), %r13
	addq	$16, %r13
	movq	32(%r14,%rbx), %rdx
	movq	%r15, %rdi
	movq	%rax, %r15
	movq	%rax, %rsi
	callq	_ltsReadBlock
	movq	%r15, (%r13)
	movq	_TapeBlockPayloadSize@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14,%rbx)
	movq	32(%r14,%rbx), %rdi
	callq	_TapeBlockGetTrailer
	movl	(%rax), %eax
	movl	%eax, 40(%r14,%rbx)
LBB0_4:
	cmpl	%r12d, 24(%r14,%rbx)
	jge	LBB0_6
## %bb.5:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_6:
	movl	%r12d, 28(%r14,%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TapeBlockPayloadSize,4,2       ## @TapeBlockPayloadSize
	.comm	_BLCKSZ,8,3                     ## @BLCKSZ
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid tape seek position"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LogicalTapeSeek                ; -- Begin function LogicalTapeSeek
	.p2align	2
_LogicalTapeSeek:                       ; @LogicalTapeSeek
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	tbnz	w1, #31, LBB0_2
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, w22
	cset	w0, gt
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_Assert
	ldr	x23, [x21, #8]
	sxtw	x24, w22
	mov	w8, #48
	smaddl	x22, w22, w8, x23
	ldr	w0, [x22]
	bl	_Assert
	cmp	w19, #0
Lloh0:
	adrp	x25, _TapeBlockPayloadSize@GOTPAGE
Lloh1:
	ldr	x25, [x25, _TapeBlockPayloadSize@GOTPAGEOFF]
	ldr	w8, [x25]
	ccmp	w8, w19, #8, ge
	cset	w0, ge
	bl	_Assert
	ldr	x8, [x22, #8]
Lloh2:
	adrp	x9, _BLCKSZ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BLCKSZ@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x22, #16]!
	cmp	x8, x20
	b.eq	LBB0_5
; %bb.4:
	mov	w8, #48
	madd	x26, x24, x8, x23
	ldr	x2, [x26, #32]
	mov	x0, x21
	mov	x1, x20
	bl	_ltsReadBlock
	str	x20, [x22]
	ldr	w8, [x25]
	str	w8, [x26, #24]
	ldr	x0, [x26, #32]
	bl	_TapeBlockGetTrailer
	ldr	w8, [x0]
	str	w8, [x26, #40]
LBB0_5:
	mov	w8, #48
	madd	x8, x24, x8, x23
	ldr	w8, [x8, #24]
	cmp	w8, w19
	b.ge	LBB0_7
; %bb.6:
Lloh5:
	adrp	x8, _ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_7:
	mov	w8, #48
	madd	x8, x24, x8, x23
	str	w19, [x8, #28]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TapeBlockPayloadSize,4,2       ; @TapeBlockPayloadSize
	.comm	_BLCKSZ,8,3                     ; @BLCKSZ
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid tape seek position"

.subsections_via_symbols
