	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LogicalTapeRewindForWrite      ## -- Begin function LogicalTapeRewindForWrite
	.p2align	4, 0x90
_LogicalTapeRewindForWrite:             ## @LogicalTapeRewindForWrite
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	xorl	%r14d, %r14d
	movl	$0, %edi
	testl	%esi, %esi
	js	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpl	%r12d, (%r15)
	setg	%dil
LBB0_2:
	callq	_Assert
	movq	8(%r15), %r15
	movslq	%r12d, %rbx
	shlq	$6, %rbx
	leaq	(%r15,%rbx), %r12
	cmpl	$0, (%r15,%rbx)
	jne	LBB0_4
## %bb.3:
	xorl	%r14d, %r14d
	cmpl	$0, 56(%r15,%rbx)
	sete	%r14b
LBB0_4:
	movl	%r14d, %edi
	callq	_Assert
	movl	$1, (%r12)
	movl	$0, 4(%r15,%rbx)
	pcmpeqd	%xmm0, %xmm0
	movdqu	%xmm0, 8(%r15,%rbx)
	pxor	%xmm0, %xmm0
	movdqu	%xmm0, 40(%r15,%rbx)
	movq	32(%r15,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_pfree
	pxor	%xmm0, %xmm0
LBB0_6:
	movdqu	%xmm0, 24(%r15,%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function LogicalTapeRewindForWrite
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_LogicalTapeRewindForWrite
	.p2align	2
_LogicalTapeRewindForWrite:             ; @LogicalTapeRewindForWrite
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	tbnz	w1, #31, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, w19
	cset	w0, gt
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_Assert
	ldr	x20, [x20, #8]
	sxtw	x19, w19
	add	x21, x20, x19, lsl #6
	ldr	w8, [x21]
	cbz	w8, LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w8, [x21, #56]
	cmp	w8, #0
	cset	w0, eq
LBB0_6:
	bl	_Assert
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x21]
	mov	x8, #-1
	stp	x8, x8, [x21, #8]
	stp	xzr, xzr, [x21, #40]
	ldr	x0, [x21, #32]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_pfree
LBB0_8:
	add	x8, x20, x19, lsl #6
	stp	xzr, xzr, [x8, #24]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
