	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ffio_ensure_seekback           ## -- Begin function ffio_ensure_seekback
	.p2align	4, 0x90
_ffio_ensure_seekback:                  ## @ffio_ensure_seekback
	.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, %r14
	movl	(%rdi), %r15d
	testl	%r15d, %r15d
	jne	LBB0_2
## %bb.1:
	movq	_IO_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_2:
	movq	24(%r14), %rbx
	movq	8(%r14), %r12
	subq	%r12, %rbx
	shrq	$2, %rbx
	movq	16(%r14), %r13
	xorl	%ecx, %ecx
	cmpq	$1, %r13
	sbbl	%ecx, %ecx
	movq	32(%r14), %rax
	subq	%r12, %rax
	shrq	$2, %rax
	addl	%esi, %r15d
	addl	%eax, %r15d
	cmpl	%ebx, %r15d
	jl	LBB0_8
## %bb.3:
	cmpq	$0, 48(%r14)
	je	LBB0_4
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpl	$0, 44(%r14)
	je	LBB0_8
## %bb.5:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	xorl	%edi, %edi
	cmpl	$0, 40(%r14)
	sete	%dil
	callq	_av_assert0
	movl	%r15d, %edi
	callq	_av_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	subq	%r12, %r13
	shrq	$2, %r13
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	orl	%r13d, %r12d
	movq	8(%r14), %rsi
	movq	%rax, %r13
	movq	%rax, %rdi
	movl	%ebx, %edx
	callq	_memcpy
	movq	8(%r14), %rdi
	callq	_av_free
	movq	32(%r14), %rax
	movq	8(%r14), %rcx
	movq	24(%r14), %rdx
	subq	%rcx, %rax
	addq	%r13, %rax
	movq	%rax, 32(%r14)
	subq	%rcx, %rdx
	addq	%r13, %rdx
	movq	%rdx, 24(%r14)
	movq	%r13, 8(%r14)
	movl	%r15d, 4(%r14)
	testl	%r12d, %r12d
	js	LBB0_8
## %bb.7:
	movl	%r12d, %eax
	movl	%r12d, %eax
	leaq	(,%rax,4), %rax
	addq	%r13, %rax
	movq	%rax, 16(%r14)
	jmp	LBB0_8
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_BUFFER_SIZE,4,2             ## @IO_BUFFER_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ffio_ensure_seekback           ; -- Begin function ffio_ensure_seekback
	.p2align	2
_ffio_ensure_seekback:                  ; @ffio_ensure_seekback
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _IO_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IO_BUFFER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w8, w9, w8, eq
	ldp	x9, x10, [x0, #8]
	ldp	x11, x12, [x0, #24]
	sub	x11, x11, x9
	lsr	x21, x11, #2
	cmp	x10, #0
	sub	x10, x10, x9
	lsr	x10, x10, #2
	csinv	w23, w10, wzr, ne
	sub	x9, x12, x9
	lsr	x9, x9, #2
	add	w8, w8, w1
	add	w20, w8, w9
	cmp	w20, w21
	b.lt	LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #48]
	cbz	x8, LBB0_3
LBB0_2:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	w8, [x19, #44]
	cbz	w8, LBB0_2
; %bb.4:
	ldr	w8, [x19, #40]
	cmp	w8, #0
	cset	w0, eq
	bl	_av_assert0
	mov	x0, x20
	bl	_av_malloc
	cbz	x0, LBB0_7
; %bb.5:
	mov	x22, x0
	ldr	x1, [x19, #8]
	mov	x2, x21
	bl	_memcpy
	ldr	x0, [x19, #8]
	bl	_av_free
	ldr	x8, [x19, #8]
	ldp	x10, x9, [x19, #24]
	sub	x9, x9, x8
	add	x9, x22, x9
	sub	x8, x10, x8
	add	x8, x22, x8
	stp	x8, x9, [x19, #24]
	str	x22, [x19, #8]
	str	w20, [x19, #4]
	tbnz	w23, #31, LBB0_2
; %bb.6:
	add	x8, x22, w23, uxtw #2
	str	x8, [x19, #16]
	b	LBB0_2
LBB0_7:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_BUFFER_SIZE,4,2             ; @IO_BUFFER_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
