	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__ve_envelope_search            ## -- Begin function _ve_envelope_search
	.p2align	4, 0x90
__ve_envelope_search:                   ## @_ve_envelope_search
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	40(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	32(%rdi), %rax
	movq	(%rax), %r15
	movl	(%r15), %eax
	movl	4(%r15), %esi
	cltd
	idivl	%esi
	movl	%eax, %ecx
	movl	(%rdi), %eax
	cltd
	idivl	%esi
	movq	_VE_WIN@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	movslq	%eax, %rsi
	movq	%rsi, %r13
	subq	%rdx, %r13
	xorl	%r14d, %r14d
	testl	%ecx, %ecx
	cmovgl	%ecx, %r14d
	movq	_VE_POST@GOTPCREL(%rip), %rax
	addl	(%rax), %esi
	cmpl	8(%r15), %esi
	jle	LBB0_2
## %bb.1:
	movl	%esi, 8(%r15)
	movq	16(%r15), %rdi
	shll	$2, %esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	__ogg_realloc
	movq	%rax, 16(%r15)
LBB0_2:
	movl	%r14d, %ecx
	cmpq	%r13, %rcx
	jge	LBB0_16
## %bb.3:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %r12
	movq	32(%r15), %rax
	movq	_VE_BANDS@GOTPCREL(%rip), %r9
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r15), %rdi
	movq	_VE_POST@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	addq	%rcx, %rdx
	movl	$0, (%rdi,%rdx,4)
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%rcx
	cmpq	%r13, %rcx
	jge	LBB0_16
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	24(%r15), %edi
	leal	1(%rdi), %r8d
	movq	_VE_MAXSTRETCH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	addl	%edx, %edx
	cmpl	%edx, %edi
	cmovll	%r8d, %edx
	movl	%edx, 24(%r15)
	testq	%rax, %rax
	jle	LBB0_28
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	8(%rbx), %rax
	movslq	4(%r15), %rdx
	imulq	%rcx, %rdx
	shlq	$2, %rdx
	addq	(%rax,%r14,8), %rdx
	movl	64(%r15), %ecx
	movq	(%r9), %r8
	imulq	%r14, %r8
	shlq	$3, %r8
	addq	56(%r15), %r8
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r9, %r13
	callq	__ve_amp
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %r9
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, %edi
	incq	%r14
	movq	32(%r15), %rax
	cmpq	%rax, %r14
	jl	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r15), %r8
	movq	_VE_POST@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	addq	%rcx, %rdx
	movl	$0, (%r8,%rdx,4)
	testb	$1, %dil
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movabsq	$4294967297, %rdx               ## imm = 0x100000001
	movq	%rdx, (%r8,%rcx,4)
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	testb	$2, %dil
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, (%r8,%rcx,4)
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, -4(%r8,%rcx,4)
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	testb	$4, %dil
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$-1, 24(%r15)
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_16:
	movslq	4(%r15), %rdi
	movl	%edi, %ecx
	imull	%r13d, %ecx
	movl	%ecx, (%r15)
	movq	24(%rbx), %rax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %r11
	movl	(%r11,%rax,4), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	movl	(%r11), %esi
	leal	3(%rsi), %eax
	testl	%esi, %esi
	cmovnsl	%esi, %eax
	movq	40(%r15), %rsi
	subl	%edi, %ecx
	movslq	%ecx, %r10
	movq	$-1, %r8
	cmpq	%r10, %rsi
	jge	LBB0_27
## %bb.17:
	movq	16(%rbx), %r9
	sarl	$2, %edx
	movslq	%edx, %rcx
	addq	%r9, %rcx
	movl	4(%r11), %r11d
	movl	%r11d, %edx
	shrl	$31, %edx
	addl	%r11d, %edx
	sarl	%edx
	movslq	%edx, %rdx
	addq	%rcx, %rdx
	sarl	$2, %eax
	movslq	%eax, %r11
	addq	%rdx, %r11
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_18 Depth=1
	addq	%rdi, %rsi
	cmpq	%r10, %rsi
	jge	LBB0_27
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%r11, %rsi
	jge	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%rsi, 40(%r15)
	movq	16(%r15), %rcx
	movq	%rsi, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%rsi, %rax
	cqto
	idivq	%rdi
	cmpl	$0, (%rcx,%rax,4)
	jne	LBB0_24
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_18 Depth=1
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $eax killed $eax def $rax
	cmpl	$0, (%rcx,%rax,4)
	je	LBB0_26
LBB0_24:                                ##   in Loop: Header=BB0_18 Depth=1
	cmpq	%r9, %rsi
	jle	LBB0_26
## %bb.25:
	movq	%rsi, 48(%r15)
	xorl	%r8d, %r8d
	jmp	LBB0_27
LBB0_19:
	movl	$1, %r8d
LBB0_27:
	movq	%r8, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VE_WIN,4,2                     ## @VE_WIN
	.comm	_VE_POST,4,2                    ## @VE_POST
	.comm	_VE_MAXSTRETCH,4,2              ## @VE_MAXSTRETCH
	.comm	_VE_BANDS,8,3                   ## @VE_BANDS
	.comm	_seq,4,2                        ## @seq
	.comm	_stderr,4,2                     ## @stderr
	.comm	_totalshift,4,2                 ## @totalshift
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__ve_envelope_search            ; -- Begin function _ve_envelope_search
	.p2align	2
__ve_envelope_search:                   ; @_ve_envelope_search
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x20, x0
	ldp	x9, x8, [x0, #32]
	ldr	x8, [x8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x19, [x9]
	ldp	w8, w9, [x19]
	sdiv	w8, w8, w9
	ldr	w10, [x0]
Lloh0:
	adrp	x11, _VE_WIN@GOTPAGE
Lloh1:
	ldr	x11, [x11, _VE_WIN@GOTPAGEOFF]
	sdiv	w9, w10, w9
Lloh2:
	ldrsw	x10, [x11]
	sxtw	x11, w9
	sub	x23, x11, x10
	cmp	w8, #0
	csel	w24, w8, wzr, gt
Lloh3:
	adrp	x25, _VE_POST@GOTPAGE
Lloh4:
	ldr	x25, [x25, _VE_POST@GOTPAGEOFF]
	ldr	w8, [x25]
	ldr	w10, [x19, #8]
	add	w8, w8, w9
	cmp	w8, w10
	b.le	LBB0_2
; %bb.1:
	str	w8, [x19, #8]
	ldr	x0, [x19, #16]
	lsl	w1, w8, #2
	bl	__ogg_realloc
	str	x0, [x19, #16]
LBB0_2:
	cmp	x24, x23
	b.ge	LBB0_16
; %bb.3:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x21, x8, #8
Lloh5:
	adrp	x26, _VE_MAXSTRETCH@GOTPAGE
Lloh6:
	ldr	x26, [x26, _VE_MAXSTRETCH@GOTPAGEOFF]
	ldr	x8, [x19, #32]
Lloh7:
	adrp	x22, _VE_BANDS@GOTPAGE
Lloh8:
	ldr	x22, [x22, _VE_BANDS@GOTPAGEOFF]
	movi.2s	v8, #1
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x19, #16]
	ldrsw	x10, [x25]
	add	x10, x24, x10
	str	wzr, [x9, x10, lsl #2]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x24, x24, #1
	cmp	x24, x23
	b.ge	LBB0_16
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	w9, [x19, #24]
	ldr	w10, [x26]
	lsl	w10, w10, #1
	cmp	w9, w10
	csinc	w9, w10, w9, ge
	str	w9, [x19, #24]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x28, #0
	mov	w27, #0
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x28, lsl #3]
	ldrsw	x9, [x19, #4]
	mul	x9, x24, x9
	add	x2, x8, x9, lsl #2
	ldr	w3, [x19, #64]
	ldr	x8, [x19, #56]
	ldr	x9, [x22]
	mul	x9, x9, x28
	add	x4, x8, x9, lsl #3
	mov	x0, x19
	mov	x1, x21
	bl	__ve_amp
	orr	w27, w0, w27
	add	x28, x28, #1
	ldr	x8, [x19, #32]
	cmp	x28, x8
	b.lt	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x19, #16]
	ldrsw	x10, [x25]
	add	x10, x24, x10
	str	wzr, [x9, x10, lsl #2]
	tbz	w27, #0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	lsl	x10, x24, #2
	str	d8, [x9, x10]
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	tbz	w27, #1, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w10, #1
	str	w10, [x9, x24, lsl #2]
	cbz	x24, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x9, x24, lsl #2
	mov	w10, #1
	stur	w10, [x9, #-4]
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	tbz	w27, #2, LBB0_5
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w9, #-1
	str	w9, [x19, #24]
	b	LBB0_5
LBB0_16:
	ldrsw	x8, [x19, #4]
	mul	w10, w8, w23
	str	w10, [x19]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x9, [x9]
	ldr	x11, [x20, #24]
	ldr	w11, [x9, x11, lsl #2]
	add	w12, w11, #3
	cmp	w11, #0
	csel	w12, w12, w11, lt
	ldp	w9, w11, [x9]
	cmp	w11, #0
	cinc	w13, w11, lt
	add	w11, w9, #3
	cmp	w9, #0
	csel	w14, w11, w9, lt
	ldr	x9, [x19, #40]
	sub	w10, w10, w8
	sxtw	x10, w10
	cmp	x9, x10
	b.ge	LBB0_21
; %bb.17:
	ldr	x11, [x20, #16]
	asr	w12, w12, #2
	add	x12, x11, w12, sxtw
	asr	w13, w13, #1
	add	x12, x12, w13, sxtw
	asr	w13, w14, #2
	add	x12, x12, w13, sxtw
	mov	w0, #1
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	cmp	x9, x12
	b.ge	LBB0_23
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	str	x9, [x19, #40]
	ldr	x13, [x19, #16]
	sdiv	x14, x9, x8
	ldr	w13, [x13, x14, lsl #2]
	cmp	w13, #0
	ccmp	x9, x11, #4, ne
	b.gt	LBB0_22
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	add	x9, x9, x8
	cmp	x9, x10
	b.lt	LBB0_18
LBB0_21:
	mov	x0, #-1
	b	LBB0_23
LBB0_22:
	mov	x0, #0
	str	x9, [x19, #48]
LBB0_23:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_VE_WIN,4,2                     ; @VE_WIN
	.comm	_VE_POST,4,2                    ; @VE_POST
	.comm	_VE_MAXSTRETCH,4,2              ; @VE_MAXSTRETCH
	.comm	_VE_BANDS,8,3                   ; @VE_BANDS
	.comm	_seq,4,2                        ; @seq
	.comm	_stderr,4,2                     ; @stderr
	.comm	_totalshift,4,2                 ; @totalshift
.subsections_via_symbols
