	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _bisect_forward_serialno
__bisect_forward_serialno:              ## @_bisect_forward_serialno
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %ebx
	movl	%r8d, %r15d
	movl	%ecx, %r13d
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	24(%rbp), %edx
	movq	16(%rbp), %r14
	movl	%r8d, -80(%rbp)
	movl	%r9d, -60(%rbp)
	movl	$-1, -76(%rbp)
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	64(%rdi), %r12d
	movl	%r9d, %edi
	movq	%r14, %rsi
	callq	__lookup_serialno
	testq	%rax, %rax
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	je	LBB0_11
## %bb.1:
	cmpl	%ebx, %r12d
	movq	%r14, %r13
	movl	24(%rbp), %r15d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_4
## %bb.2:
	leaq	-80(%rbp), %rbx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, -60(%rbp)
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r13, %rdx
	movl	%r15d, %ecx
	leaq	-60(%rbp), %r8
	movq	%rbx, %r9
	callq	__get_prev_page_serial
	cmpl	%r12d, -60(%rbp)
	jne	LBB0_3
LBB0_4:
	movq	32(%rbp), %r12
	leaq	1(%r12), %rax
	movq	%rax, (%r14)
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	__ogg_free
LBB0_6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rdi
	testq	%rdi, %rdi
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_8
## %bb.7:
	callq	__ogg_free
LBB0_8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	__ogg_free
LBB0_10:
	movl	(%rbx), %eax
	leal	4(,%rax,4), %edi
	callq	__ogg_malloc
	movq	%rax, 8(%rbx)
	movq	56(%rbx), %rdi
	movl	(%rbx), %esi
	shll	$2, %esi
	callq	__ogg_realloc
	movq	%rax, 56(%rbx)
	movq	48(%rbx), %rdi
	movl	(%rbx), %esi
	shll	$2, %esi
	callq	__ogg_realloc
	movq	%rax, 48(%rbx)
	movl	(%rbx), %edi
	shll	$2, %edi
	callq	__ogg_malloc
	movq	%rax, 16(%rbx)
	movl	(%rbx), %edi
	shll	$2, %edi
	callq	__ogg_malloc
	movq	%rax, 24(%rbx)
	movl	(%rbx), %edi
	shll	$3, %edi
	callq	__ogg_malloc
	movq	%rax, %rcx
	movq	%rax, 32(%rbx)
	movq	8(%rbx), %rax
	movl	%r15d, 4(%rax,%r12,4)
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, (%rax,%r12,4)
	movl	-80(%rbp), %edx
	xorl	%eax, %eax
	testl	%edx, %edx
	cmovlel	%eax, %edx
	movl	%edx, 4(%rcx,%r12,8)
LBB0_31:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	%r15d, -92(%rbp)                ## 4-byte Spill
	movl	%ebx, -96(%rbp)                 ## 4-byte Spill
	movq	$0, -88(%rbp)
	movl	$0, -72(%rbp)
	movl	%r13d, %ebx
	movq	-112(%rbp), %r14                ## 8-byte Reload
	cmpl	%r14d, %r13d
	jle	LBB0_23
## %bb.12:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %edx
	movl	%eax, %r15d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_22:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	%ebx, %edx
	movl	%r13d, %r15d
	cmpl	%r14d, %r13d
	jle	LBB0_23
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%r15d, %eax
	subl	%r14d, %eax
	cltq
	movl	%r14d, %r13d
	movq	_CHUNKSIZE@GOTPCREL(%rip), %rdx
	cmpq	%rax, (%rdx)
	jg	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	leal	(%r15,%r14), %eax
	movl	%eax, %r13d
	shrl	$31, %r13d
	addl	%eax, %r13d
	sarl	%r13d
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	__seek_helper
	testl	%eax, %eax
	jne	LBB0_31
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%rbx, %rdi
	leaq	-104(%rbp), %rsi
	movl	$-1, %edx
	callq	__get_next_page
	movl	%eax, %ebx
	movq	_OV_EREAD@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	testl	%ebx, %ebx
	js	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	-104(%rbp), %rdi
	movq	16(%rbp), %rsi
	movl	24(%rbp), %edx
	callq	__lookup_page_serialno
	testl	%eax, %eax
	je	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	40(%rax), %r14d
	movl	%r15d, %r13d
	jmp	LBB0_21
LBB0_23:
	leaq	-76(%rbp), %r14
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %eax
	movl	24(%rbp), %r13d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbp), %r15
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, -64(%rbp)
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	movl	%r13d, %ecx
	leaq	-64(%rbp), %r8
	movq	%r14, %r9
	callq	__get_prev_page_serial
	cmpl	%r12d, -64(%rbp)
	jne	LBB0_24
## %bb.25:
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	__seek_helper
	testl	%eax, %eax
	jne	LBB0_31
## %bb.26:
	leaq	-68(%rbp), %rsi
	leaq	-100(%rbp), %rdx
	leaq	-88(%rbp), %rcx
	leaq	-72(%rbp), %r8
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	callq	__fetch_headers
	testl	%eax, %eax
	jne	LBB0_31
## %bb.27:
	movl	40(%rbx), %r15d
	movl	64(%rbx), %r12d
	leaq	-68(%rbp), %rsi
	movq	%rbx, %rdi
	callq	__initial_pcmoffset
	movl	%eax, %r13d
	movl	40(%rbx), %edx
	movl	-72(%rbp), %r10d
	movq	32(%rbp), %rcx
	leaq	1(%rcx), %rax
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-92(%rbp), %r8d                 ## 4-byte Reload
	movl	-96(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rax
	pushq	%r10
	pushq	-88(%rbp)
	callq	__bisect_forward_serialno
	addq	$32, %rsp
	testl	%eax, %eax
	jne	LBB0_31
## %bb.28:
	movq	-88(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_30
## %bb.29:
	callq	__ogg_free
LBB0_30:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rax
	movq	32(%rbp), %rsi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 4(%rax,%rsi,4)
	movq	16(%rdx), %rax
	movl	%r12d, 4(%rax,%rsi,4)
	movq	24(%rdx), %rax
	movl	%r15d, 4(%rax,%rsi,4)
	movl	-68(%rbp), %eax
	movq	56(%rdx), %rcx
	movl	%eax, 4(%rcx,%rsi,4)
	movl	-100(%rbp), %eax
	movq	48(%rdx), %rcx
	movl	%eax, 4(%rcx,%rsi,4)
	movl	-76(%rbp), %eax
	movq	32(%rdx), %rcx
	movl	%eax, 4(%rcx,%rsi,8)
	movl	%r13d, 8(%rcx,%rsi,8)
	movl	12(%rcx,%rsi,8), %edx
	subl	%r13d, %edx
	xorl	%eax, %eax
	testl	%edx, %edx
	cmovlel	%eax, %edx
	movl	%edx, 12(%rcx,%rsi,8)
	jmp	LBB0_31
LBB0_17:
	movl	%ebx, %eax
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_CHUNKSIZE,8,3                  ## @CHUNKSIZE
	.comm	_OV_EREAD,4,2                   ## @OV_EREAD
	.no_dead_strip	__bisect_forward_serialno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _bisect_forward_serialno
__bisect_forward_serialno:              ; @_bisect_forward_serialno
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x7
	mov	x24, x6
	mov	x21, x5
	mov	x27, x4
	mov	x22, x3
	mov	x26, x2
	mov	x25, x1
	mov	x19, x0
	ldr	x20, [x29, #16]
	stp	w5, w4, [sp, #56]
	mov	w8, #-1
	str	w8, [sp, #52]
	ldr	w28, [x0, #64]
	mov	x0, x5
	mov	x1, x6
	mov	x2, x7
	bl	__lookup_serialno
	cbz	x0, LBB0_12
; %bb.1:
	cmp	w28, w21
	b.eq	LBB0_4
; %bb.2:
	mov	x1, x22
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	w28, [sp, #56]
	add	x4, sp, #56
	add	x5, sp, #60
	mov	x0, x19
	mov	x2, x24
	mov	x3, x23
	bl	__get_prev_page_serial
	mov	x1, x0
	ldr	w8, [sp, #56]
	cmp	w8, w28
	b.ne	LBB0_3
LBB0_4:
	add	x21, x20, #1
	str	x21, [x19]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.5:
	bl	__ogg_free
LBB0_6:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_8
; %bb.7:
	bl	__ogg_free
LBB0_8:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_10
; %bb.9:
	bl	__ogg_free
LBB0_10:
	ldr	w8, [x19]
	lsl	w8, w8, #2
	add	w0, w8, #4
	bl	__ogg_malloc
	str	x0, [x19, #8]
	ldr	x0, [x19, #56]
	ldr	w8, [x19]
	lsl	w1, w8, #2
	bl	__ogg_realloc
	str	x0, [x19, #56]
	ldr	x0, [x19, #48]
	ldr	w8, [x19]
	lsl	w1, w8, #2
	bl	__ogg_realloc
	str	x0, [x19, #48]
	ldr	w8, [x19]
	lsl	w0, w8, #2
	bl	__ogg_malloc
	str	x0, [x19, #16]
	ldr	w8, [x19]
	lsl	w0, w8, #2
	bl	__ogg_malloc
	str	x0, [x19, #24]
	ldr	w8, [x19]
	lsl	w0, w8, #3
	bl	__ogg_malloc
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #32]
	ldr	x9, [x19, #8]
	str	w22, [x9, x21, lsl #2]
	str	w25, [x9, x20, lsl #2]
	ldr	w9, [sp, #60]
	cmp	w9, #0
	csel	w9, w9, wzr, gt
	add	x8, x8, x20, lsl #3
	str	w9, [x8, #4]
LBB0_11:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_12:
	stp	w22, w27, [sp, #16]             ; 8-byte Folded Spill
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	str	xzr, [sp, #40]
	str	wzr, [sp, #36]
	mov	x25, x22
	cmp	w22, w26
	b.le	LBB0_23
; %bb.13:
	ldr	w20, [sp, #16]                  ; 4-byte Folded Reload
	mov	x22, x20
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x25, x22
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x22, x25
	mov	x20, x27
	cmp	w27, w26
	b.le	LBB0_23
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	sub	w8, w20, w26
Lloh0:
	adrp	x9, _CHUNKSIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHUNKSIZE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x9, w8, sxtw
	mov	x27, x26
	b.gt	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	w8, w20, w26
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w27, w8, #1
LBB0_18:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x19
	mov	x1, x27
	bl	__seek_helper
	cbnz	w0, LBB0_11
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x1, sp, #48
	mov	x0, x19
	mov	w2, #-1
	bl	__get_next_page
	mov	x25, x0
Lloh3:
	adrp	x8, _OV_EREAD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OV_EREAD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_31
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	tbnz	w25, #31, LBB0_14
; %bb.21:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x0, sp, #48
	mov	x1, x24
	mov	x2, x23
	bl	__lookup_page_serialno
	cbz	w0, LBB0_15
; %bb.22:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w26, [x19, #40]
	mov	x27, x20
	b	LBB0_14
LBB0_23:
	mov	x1, x25
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	str	w28, [sp, #24]
	add	x4, sp, #24
	add	x5, sp, #52
	mov	x0, x19
	mov	x2, x24
	mov	x3, x23
	bl	__get_prev_page_serial
	mov	x1, x0
	ldr	w8, [sp, #24]
	cmp	w8, w28
	b.ne	LBB0_24
; %bb.25:
	mov	x0, x19
	mov	x1, x25
	bl	__seek_helper
	ldr	w26, [sp, #20]                  ; 4-byte Folded Reload
	cbnz	w0, LBB0_11
; %bb.26:
	add	x1, sp, #32
	add	x2, sp, #28
	add	x3, sp, #40
	add	x4, sp, #36
	mov	x0, x19
	mov	x5, #0
	bl	__fetch_headers
	cbnz	w0, LBB0_11
; %bb.27:
	ldr	w22, [x19, #64]
	ldr	w20, [x19, #40]
	add	x1, sp, #32
	mov	x0, x19
	bl	__initial_pcmoffset
	mov	x23, x0
	ldr	w2, [x19, #40]
	ldr	x6, [sp, #40]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x24, x8, #1
	ldr	w7, [sp, #36]
	str	x24, [sp]
	mov	x0, x19
	mov	x1, x25
	ldr	w3, [sp, #16]                   ; 4-byte Folded Reload
	mov	x4, x26
	mov	x5, x21
	bl	__bisect_forward_serialno
	cbnz	w0, LBB0_11
; %bb.28:
	ldr	x0, [sp, #40]
	cbz	x0, LBB0_30
; %bb.29:
	bl	__ogg_free
LBB0_30:
	mov	w0, #0
	ldr	x8, [x19, #8]
	lsl	x9, x24, #2
	str	w25, [x8, x9]
	ldr	x8, [x19, #16]
	str	w22, [x8, x9]
	ldr	x8, [x19, #24]
	str	w20, [x8, x9]
	ldr	w8, [sp, #32]
	ldr	x10, [x19, #56]
	str	w8, [x10, x9]
	ldr	w8, [sp, #28]
	ldr	x10, [x19, #48]
	str	w8, [x10, x9]
	ldr	w8, [sp, #52]
	ldr	x9, [x19, #32]
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	add	x9, x9, x10, lsl #3
	stp	w8, w23, [x9, #4]
	ldr	w8, [x9, #12]
	sub	w8, w8, w23
	cmp	w8, #0
	csel	w8, w8, wzr, gt
	str	w8, [x9, #12]
	b	LBB0_11
LBB0_31:
	mov	x0, x25
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CHUNKSIZE,8,3                  ; @CHUNKSIZE
	.comm	_OV_EREAD,4,2                   ; @OV_EREAD
	.no_dead_strip	__bisect_forward_serialno
.subsections_via_symbols
