	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function resample
_resample:                              ## @resample
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r13d
	movq	%rcx, %rbx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_ARCH_X86@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	$0, %eax
	je	LBB0_2
## %bb.1:
	movq	(%r15), %rax
	movq	_SWR_ENGINE_SWR@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	movl	$7, %eax
	cmovnel	%edx, %eax
LBB0_2:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	leaq	24(%r15), %r12
	movq	24(%r15), %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_av_assert1
	movq	32(%r15), %rax
	xorl	%edi, %edi
	cmpq	8(%rbx), %rax
	sete	%dil
	callq	_av_assert1
	movq	40(%r15), %rax
	xorl	%edi, %edi
	cmpq	16(%rbx), %rax
	sete	%dil
	callq	_av_assert1
	movups	(%r14), %xmm0
	movups	16(%r14), %xmm1
	movaps	%xmm1, -176(%rbp)
	movaps	%xmm0, -192(%rbp)
	movups	(%r14), %xmm0
	movups	16(%r14), %xmm1
	movaps	%xmm1, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movups	(%rbx), %xmm0
	movups	16(%rbx), %xmm1
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm1, -112(%rbp)
	movq	64(%r15), %rax
	movl	56(%r15), %edi
	leaq	8(%r15), %r8
	leaq	12(%r15), %rbx
	leaq	-128(%rbp), %rdx
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	movl	%r13d, %ecx
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rbx, %r9
	callq	*(%rax)
	movl	%eax, %r14d
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	movl	$0, %eax
	je	LBB0_36
## %bb.3:
	testl	%r14d, %r14d
	js	LBB0_4
## %bb.5:
	je	LBB0_6
## %bb.7:
	leaq	-128(%rbp), %rdi
	movq	%rdi, %rsi
	movl	%r14d, %edx
	callq	_buf_set
	subl	%r14d, %r13d
	movl	$0, 16(%r15)
	xorl	%edi, %edi
	jmp	LBB0_8
LBB0_4:
	movl	%r14d, %eax
	jmp	LBB0_36
LBB0_6:
	movl	16(%r15), %edi
LBB0_8:
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_9 Depth=1
	addl	%r12d, %r14d
	cmpl	$3, %ecx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_33
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	testl	%edi, %edi
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_10
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, 72(%r15)
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%esi, %r13d
	jle	LBB0_19
LBB0_17:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$0, (%rbx)
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	$0, 8(%r15)
	movq	64(%r15), %rax
	movq	8(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	56(%r15), %ebx
	movl	%r13d, %edi
	subl	%esi, %edi
	xorl	%esi, %esi
	callq	_FFMAX
	movl	%ebx, %edi
	leaq	-192(%rbp), %r12
	movq	%r12, %rsi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	leaq	-128(%rbp), %rcx
	movl	%eax, %r8d
	leaq	-56(%rbp), %r9
	callq	*-80(%rbp)                      ## 8-byte Folded Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	subl	%eax, %ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, %rbx
	addl	%eax, -52(%rbp)                 ## 4-byte Folded Spill
	movq	%r12, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_buf_set
	movl	-56(%rbp), %edx
	subl	%edx, %r13d
	leaq	-128(%rbp), %rdi
	movq	%rdi, %rsi
	callq	_buf_set
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %r12
	movl	8(%r15), %edx
	movl	12(%r15), %eax
	addl	%r13d, %eax
	leal	(%rax,%rdx), %esi
	cmpl	48(%r15), %esi
	jle	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%edx, %eax
	jg	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%r13d, -80(%rbp)                ## 4-byte Spill
	movl	%r14d, %r13d
	leaq	-160(%rbp), %r14
	movq	%r14, %rdi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_buf_set
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r13d, %r14d
	movl	-80(%rbp), %r13d                ## 4-byte Reload
	callq	_copy
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_swri_realloc_audio
	testl	%eax, %eax
	js	LBB0_36
LBB0_23:                                ##   in Loop: Header=BB0_9 Depth=1
	testl	%r13d, %r13d
	je	LBB0_34
## %bb.24:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r12), %edx
	movl	%r13d, %r12d
	testl	%edx, %edx
	je	LBB0_28
## %bb.25:                              ##   in Loop: Header=BB0_9 Depth=1
	leal	2(%rdx), %eax
	movl	%eax, %r12d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%r13d, %r12d
LBB0_27:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%r13d, %eax
	cmovgel	%r13d, %r12d
LBB0_28:                                ##   in Loop: Header=BB0_9 Depth=1
	addl	8(%r15), %edx
	leaq	-160(%rbp), %rbx
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_buf_set
	movq	%rbx, %rdi
	leaq	-128(%rbp), %rbx
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_copy
	addl	%r12d, 12(%r15)
	subl	%r12d, %r13d
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_buf_set
	movl	$0, 16(%r15)
	movl	12(%r15), %eax
	xorl	%r12d, %eax
	orl	%r13d, %eax
	setne	%bl
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	jne	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_9 Depth=1
	testl	%esi, %esi
	je	LBB0_34
LBB0_30:                                ##   in Loop: Header=BB0_9 Depth=1
	xorl	%edx, %edx
	testl	%esi, %esi
	setne	%al
	xorl	%edi, %edi
	movl	$3, %ecx
	testb	%bl, %bl
	jne	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_9 Depth=1
	movb	%al, %dl
	leal	(%rdx,%rdx,2), %ecx
	xorl	%esi, %esi
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$0, (%rbx)
	je	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	8(%r15), %edx
	leaq	-160(%rbp), %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_buf_set
	movq	64(%r15), %rax
	movl	12(%r15), %r8d
	movl	56(%r15), %edi
	leaq	-192(%rbp), %r12
	movq	%r12, %rsi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	leaq	-160(%rbp), %rcx
	leaq	-56(%rbp), %r9
	callq	*8(%rax)
	subl	%eax, %ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	addl	%eax, -52(%rbp)                 ## 4-byte Folded Spill
	movq	%r12, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_buf_set
	movl	-56(%rbp), %eax
	movl	12(%r15), %edx
	subl	%eax, %edx
	movl	%edx, 12(%r15)
	addl	%eax, 8(%r15)
	testl	%r13d, %r13d
	je	LBB0_34
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%r14d, %edx
	jle	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	negl	%edx
	leaq	-128(%rbp), %rdi
	movq	%rdi, %rsi
	callq	_buf_set
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	addl	(%rbx), %r13d
	movl	$0, (%rbx)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	xorl	%r14d, %r14d
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_15
LBB0_33:
	cmpl	$2, %ecx
	jne	LBB0_35
LBB0_34:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	xorl	%ecx, %ecx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	setne	%cl
	movl	%ecx, 16(%r15)
	jmp	LBB0_36
LBB0_35:
                                        ## implicit-def: $eax
LBB0_36:
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ARCH_X86,8,3                   ## @ARCH_X86
	.comm	_SWR_ENGINE_SWR,8,3             ## @SWR_ENGINE_SWR
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_resample
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function resample
_resample:                              ; @resample
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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	x21, x4
	mov	x23, x3
	mov	x19, x2
	mov	x24, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _ARCH_X86@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ARCH_X86@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _SWR_ENGINE_SWR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SWR_ENGINE_SWR@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w8, #7
	csel	w27, w8, wzr, eq
	b	LBB0_3
LBB0_2:
	mov	w27, #0
LBB0_3:
	mov	x22, x20
	ldr	x8, [x22, #24]!
	ldr	x9, [x23]
	cmp	x8, x9
	cset	w0, eq
	bl	_av_assert1
	ldr	x8, [x22, #8]
	ldr	x9, [x23, #8]
	cmp	x8, x9
	cset	w0, eq
	bl	_av_assert1
	ldr	x8, [x22, #16]
	ldr	x9, [x23, #16]
	cmp	x8, x9
	cset	w0, eq
	bl	_av_assert1
	ldp	q0, q1, [x24]
	stp	q0, q1, [sp, #48]
	stp	q0, q1, [sp, #16]
	ldp	q0, q1, [x23]
	stp	q0, q1, [sp, #80]
	ldr	x8, [x22, #40]
	ldr	x8, [x8]
	sub	x23, x22, #16
	sub	x24, x22, #12
	ldr	w0, [x22, #32]
	add	x2, sp, #80
	mov	x1, x22
	mov	x3, x21
	mov	x4, x23
	mov	x5, x24
	blr	x8
Lloh6:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.4:
	mov	w25, #0
	b	LBB0_29
LBB0_5:
	mov	x25, x0
	tbnz	w0, #31, LBB0_29
; %bb.6:
	cbz	w25, LBB0_8
; %bb.7:
	add	x0, sp, #80
	add	x1, sp, #80
	mov	x2, x25
	bl	_buf_set
	mov	w8, #0
	sub	w21, w21, w25
	str	wzr, [x20, #16]
	b	LBB0_9
LBB0_8:
	ldr	w8, [x20, #16]
LBB0_9:
	mov	w28, #0
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	w8, #0
	cmp	w27, #0
	mov	w11, #3
	csel	w10, wzr, w11, eq
	cmp	w9, #0
	csel	w9, w11, w10, ne
	csel	w27, w27, wzr, ne
	add	w25, w26, w25
	cmp	w9, #3
	b.ne	LBB0_25
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	cbz	w8, LBB0_21
LBB0_12:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x20, #72]
	cmp	x8, #0
	ccmp	w21, w27, #0, eq
	b.le	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x24]
	cbnz	w8, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	str	wzr, [x20, #8]
	ldr	x8, [x20, #64]
	str	w28, [sp, #8]                   ; 4-byte Folded Spill
	mov	x28, x23
	ldr	x23, [x8, #8]
	ldr	w26, [x20, #56]
	sub	w0, w21, w27
	mov	w1, #0
	bl	_FFMAX
	mov	x4, x0
	add	x1, sp, #48
	add	x3, sp, #80
	add	x5, sp, #12
	mov	x0, x26
	mov	x2, x19
	blr	x23
	mov	x23, x28
	ldr	w28, [sp, #8]                   ; 4-byte Folded Reload
	mov	x2, x0
	sub	w19, w19, w0
	add	w28, w2, w28
	add	x0, sp, #48
	add	x1, sp, #48
	bl	_buf_set
	ldr	w2, [sp, #12]
	sub	w21, w21, w2
	add	x0, sp, #80
	add	x1, sp, #80
	bl	_buf_set
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	ldp	w2, w8, [x20, #8]
	add	w8, w8, w21
	add	w1, w8, w2
	ldr	w9, [x20, #48]
	cmp	w1, w9
	ccmp	w8, w2, #0, gt
	b.le	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
	bl	_swri_realloc_audio
	tbnz	w0, #31, LBB0_28
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	cbnz	w21, LBB0_19
	b	LBB0_26
LBB0_18:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x0, sp, #16
	mov	x1, x22
	bl	_buf_set
	ldr	w2, [x24]
	add	x1, sp, #16
	mov	x0, x22
	bl	_copy
	str	wzr, [x23]
	cbz	w21, LBB0_26
LBB0_19:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x24]
	add	w9, w8, #2
	cmp	w19, #0
	ccmp	w9, w21, #0, ne
	csel	w9, w9, w21, lt
	cmp	w8, #0
	csel	w26, w21, w9, eq
	ldr	w9, [x20, #8]
	add	w2, w9, w8
	add	x0, sp, #16
	mov	x1, x22
	bl	_buf_set
	add	x0, sp, #16
	add	x1, sp, #80
	mov	x2, x26
	bl	_copy
	ldr	w8, [x20, #12]
	add	w8, w8, w26
	str	w8, [x20, #12]
	sub	w21, w21, w26
	add	x0, sp, #80
	add	x1, sp, #80
	mov	x2, x26
	bl	_buf_set
	str	wzr, [x20, #16]
	ldr	w8, [x20, #12]
	cmp	w8, w26
	ccmp	w21, #0, #0, eq
	cset	w9, ne
	b.ne	LBB0_10
; %bb.20:                               ;   in Loop: Header=BB0_11 Depth=1
	cbnz	w27, LBB0_10
	b	LBB0_26
LBB0_21:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x24]
	cbz	w8, LBB0_12
; %bb.22:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w2, [x20, #8]
	add	x0, sp, #16
	mov	x1, x22
	bl	_buf_set
	ldr	x8, [x20, #64]
	ldr	x8, [x8, #8]
	ldr	w0, [x20, #56]
	ldr	w4, [x20, #12]
	add	x1, sp, #48
	add	x3, sp, #16
	add	x5, sp, #12
	mov	x2, x19
	blr	x8
	mov	x2, x0
	sub	w19, w19, w0
	add	w28, w2, w28
	add	x0, sp, #48
	add	x1, sp, #48
	bl	_buf_set
	ldr	w9, [sp, #12]
	ldp	w10, w8, [x20, #8]
	sub	w8, w8, w9
	add	w9, w10, w9
	stp	w9, w8, [x20, #8]
	cbz	w21, LBB0_26
; %bb.23:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w8, w25
	b.gt	LBB0_12
; %bb.24:                               ;   in Loop: Header=BB0_11 Depth=1
	neg	w2, w8
	add	x0, sp, #80
	add	x1, sp, #80
	bl	_buf_set
	mov	w25, #0
	ldr	w8, [x24]
	add	w21, w8, w21
	str	xzr, [x23]
	b	LBB0_12
LBB0_25:
	cmp	w9, #2
	b.ne	LBB0_27
LBB0_26:
	cmp	w19, #0
	cset	w8, ne
	str	w8, [x20, #16]
	mov	x25, x28
	b	LBB0_29
LBB0_27:
                                        ; implicit-def: $w25
	b	LBB0_29
LBB0_28:
	mov	x25, x0
LBB0_29:
	mov	x0, x25
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ARCH_X86,8,3                   ; @ARCH_X86
	.comm	_SWR_ENGINE_SWR,8,3             ; @SWR_ENGINE_SWR
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_resample
.subsections_via_symbols
