	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LogicalTapeRewindForRead       ## -- Begin function LogicalTapeRewindForRead
	.p2align	4, 0x90
_LogicalTapeRewindForRead:              ## @LogicalTapeRewindForRead
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, %r14
	xorl	%edi, %edi
	testl	%esi, %esi
	js	LBB0_2
## %bb.1:
	cmpl	%r15d, (%r14)
	setg	%dil
LBB0_2:
	callq	_Assert
	movq	8(%r14), %r13
	movslq	%r15d, %rax
	leaq	(%rax,%rax,4), %rbx
	shlq	$4, %rbx
	movl	(%r13,%rbx), %edi
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	testl	%edi, %edi
	jne	LBB0_7
## %bb.3:
	cmpq	%r12, %r15
	cmovaq	%r15, %r12
	movq	8(%r13,%rbx), %rax
	cmpq	%rax, %r12
	cmovaeq	%rax, %r12
	movq	%r12, %rax
	orq	%r15, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:
	movq	%r12, %rax
	xorl	%edx, %edx
	divq	%r15
	jmp	LBB0_6
LBB0_4:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%r15d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_6:
	subq	%rdx, %r12
	movq	%r12, %r15
LBB0_7:
	cmpl	$0, 16(%r13,%rbx)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_11
## %bb.8:
	leaq	(%rbx,%r13), %r12
	addq	$16, %r12
	cmpq	$0, 72(%r13,%rbx)
	je	LBB0_10
## %bb.9:
	movslq	20(%r13,%rbx), %rdi
	movl	24(%r13,%rbx), %esi
	subl	%edi, %esi
	shlq	$2, %rdi
	addq	56(%r13,%rbx), %rdi
	callq	_VALGRIND_MAKE_MEM_DEFINED
	movq	56(%r13,%rbx), %rdi
	movl	20(%r13,%rbx), %esi
	callq	_TapeBlockSetNBytes
	movl	64(%r13,%rbx), %esi
	movq	56(%r13,%rbx), %rdx
	movq	%r14, %rdi
	callq	_ltsWriteBlock
LBB0_10:
	movl	$0, (%r12)
	jmp	LBB0_12
LBB0_11:
	callq	_Assert
LBB0_12:
	leaq	(%rbx,%r13), %r14
	addq	$56, %r14
	movq	56(%r13,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:
	callq	_pfree
LBB0_14:
	leaq	(%rbx,%r13), %rsi
	movq	$0, (%r14)
	movq	$0, 24(%r13,%rbx)
	cmpq	$-1, 32(%r13,%rbx)
	je	LBB0_15
## %bb.16:
	movq	%r15, %r12
	leaq	(%rbx,%r13), %r15
	addq	$24, %r15
	movq	%r12, %rdi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_palloc
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rax, (%r14)
	movq	%r12, (%r15)
	movq	8(%r15), %rax
	jmp	LBB0_17
LBB0_15:
	movq	$-1, %rax
LBB0_17:
	movq	%rax, 40(%r13,%rbx)
	movq	$0, 48(%r13,%rbx)
	movl	$0, 20(%r13,%rbx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ltsReadFillBuffer              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BLCKSZ,8,3                     ## @BLCKSZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LogicalTapeRewindForRead       ; -- Begin function LogicalTapeRewindForRead
	.p2align	2
_LogicalTapeRewindForRead:              ; @LogicalTapeRewindForRead
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	tbnz	w1, #31, LBB0_2
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, w20
	cset	w0, gt
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_Assert
	ldr	x23, [x19, #8]
	sxtw	x24, w20
	mov	w8, #80
	smaddl	x20, w20, w8, x23
	ldr	w0, [x20]
Lloh0:
	adrp	x8, _BLCKSZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLCKSZ@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	cbnz	w0, LBB0_5
; %bb.4:
	cmp	x21, x22
	csel	x8, x21, x22, hi
	mov	w9, #80
	madd	x9, x24, x9, x23
	ldr	x9, [x9, #8]
	cmp	x8, x9
	csel	x8, x8, x9, lo
	udiv	x8, x8, x21
	mul	x21, x8, x21
LBB0_5:
	mov	w8, #80
	madd	x22, x24, x8, x23
	ldr	w8, [x22, #16]!
	cbz	w8, LBB0_9
; %bb.6:
	mov	w8, #80
	madd	x8, x24, x8, x23
	ldr	x8, [x8, #72]
	cbz	x8, LBB0_8
; %bb.7:
	mov	w8, #80
	madd	x25, x24, x8, x23
	ldr	x8, [x25, #56]
	ldp	w9, w10, [x25, #20]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	x0, x8, x9, lsl #2
	sub	w1, w10, w9
	bl	_VALGRIND_MAKE_MEM_DEFINED
	ldr	x0, [x25, #56]
	ldr	w1, [x25, #20]
	bl	_TapeBlockSetNBytes
	ldr	w1, [x25, #64]
	ldr	x2, [x25, #56]
	mov	x0, x19
	bl	_ltsWriteBlock
LBB0_8:
	str	wzr, [x22]
	b	LBB0_10
LBB0_9:
	bl	_Assert
LBB0_10:
	mov	w8, #80
	madd	x22, x24, x8, x23
	ldr	x0, [x22, #56]!
	cbz	x0, LBB0_12
; %bb.11:
	bl	_pfree
LBB0_12:
	str	xzr, [x22]
	mov	w8, #80
	madd	x25, x24, x8, x23
	str	xzr, [x25, #24]!
	mov	x26, x25
	ldr	x8, [x26, #8]!
	cmn	x8, #1
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x21
	bl	_palloc
	str	x0, [x22]
	str	x21, [x25]
	ldr	x8, [x26]
LBB0_14:
	mov	w9, #80
	madd	x9, x24, x9, x23
	stp	x8, xzr, [x9, #40]
	str	wzr, [x9, #20]
	mov	x0, x19
	mov	x1, x20
	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
	b	_ltsReadFillBuffer
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BLCKSZ,8,3                     ; @BLCKSZ
.subsections_via_symbols
