	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _open_seekable2
__open_seekable2:                       ## @_open_seekable2
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r14
	movq	$-1, -48(%rbp)
	movl	68(%rdi), %r12d
	movl	%r12d, -36(%rbp)
	movl	64(%rdi), %esi
	callq	__initial_pcmoffset
	movq	56(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.1:
	cmpq	$0, 48(%rbx)
	je	LBB0_6
## %bb.2:
	movq	%rax, %r15
	movl	40(%rbx), %edi
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	*%rcx
	movl	40(%rbx), %edi
	callq	*48(%rbx)
	movl	%eax, 12(%rbx)
	movl	%eax, 8(%rbx)
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.3:
	movq	16(%rbx), %rdx
	movl	4(%rdx), %ecx
	addq	$8, %rdx
	leaq	-36(%rbp), %r8
	leaq	-48(%rbp), %r9
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	__get_prev_page_serial
	testq	%rax, %rax
	js	LBB0_9
## %bb.4:
	movq	-48(%rbp), %r8
	movl	-36(%rbp), %r9d
	movq	16(%rbx), %r10
	movl	4(%r10), %r11d
	addq	$8, %r10
	subq	$8, %rsp
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	movq	%rax, %rcx
	pushq	$0
	pushq	%r11
	pushq	%r10
	callq	__bisect_forward_serialno
	addq	$32, %rsp
	testq	%rax, %rax
	js	LBB0_10
## %bb.5:
	movq	32(%rbx), %rax
	movq	$0, (%rax)
	movq	16(%rbx), %rax
	movl	%r12d, (%rax)
	movq	(%rbx), %rax
	movq	%r14, (%rax)
	movq	24(%rbx), %rax
	movq	%r15, (%rax)
	movq	8(%rax), %rcx
	subq	%r15, %rcx
	xorl	%edx, %edx
	testq	%rcx, %rcx
	cmovgq	%rcx, %rdx
	movq	%rdx, 8(%rax)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ov_raw_seek
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_9
LBB0_6:
	movq	$-1, 8(%rbx)
LBB0_7:
	movq	_OV_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_OV_EREAD@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_OV_EINVAL,4,2                  ## @OV_EINVAL
	.comm	_OV_EREAD,4,2                   ## @OV_EREAD
	.no_dead_strip	__open_seekable2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _open_seekable2
__open_seekable2:                       ; @_open_seekable2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x20, [x8]
	mov	x8, #-1
	str	x8, [sp, #8]
	ldp	w1, w22, [x0, #64]
	str	w22, [sp, #4]
	bl	__initial_pcmoffset
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	x9, [x19, #48]
	cbz	x9, LBB0_6
; %bb.2:
	mov	x21, x0
	ldr	w0, [x19, #40]
Lloh0:
	adrp	x9, _SEEK_END@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SEEK_END@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
	mov	w1, #0
	blr	x8
	ldr	x8, [x19, #48]
	ldr	w0, [x19, #40]
	blr	x8
	stp	w0, w0, [x19, #8]
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.3:
	mov	x1, x0
	ldr	x8, [x19, #16]
	add	x2, x8, #8
	ldr	w3, [x8, #4]
	add	x4, sp, #4
	add	x5, sp, #8
	mov	x0, x19
	bl	__get_prev_page_serial
	mov	x3, x0
	tbnz	x0, #63, LBB0_9
; %bb.4:
	ldr	x4, [sp, #8]
	ldr	w5, [sp, #4]
	ldr	x8, [x19, #16]
	add	x6, x8, #8
	ldr	w7, [x8, #4]
	str	wzr, [sp]
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	__bisect_forward_serialno
	tbnz	x0, #63, LBB0_10
; %bb.5:
	ldr	x8, [x19, #32]
	str	xzr, [x8]
	ldp	x8, x9, [x19, #16]
	str	w22, [x8]
	ldr	x8, [x19]
	str	x20, [x8]
	ldr	x8, [x9, #8]
	sub	x8, x8, x21
	cmp	x8, #0
	csel	x8, x8, xzr, gt
	stp	x21, x8, [x9]
	mov	x0, x19
	mov	x1, x20
	bl	_ov_raw_seek
	mov	x3, x0
	b	LBB0_9
LBB0_6:
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x19, #8]
LBB0_7:
Lloh3:
	adrp	x8, _OV_EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OV_EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w3, [x8]
LBB0_9:
	mov	x0, x3
	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
	add	sp, sp, #64
	ret
LBB0_10:
Lloh5:
	adrp	x8, _OV_EREAD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OV_EREAD@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_OV_EINVAL,4,2                  ; @OV_EINVAL
	.comm	_OV_EREAD,4,2                   ; @OV_EREAD
	.no_dead_strip	__open_seekable2
.subsections_via_symbols
