	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function hb_audio_resample
LCPI0_0:
	.quad	0x40f5f90000000000              ## double 9.0E+4
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_hb_audio_resample
	.p2align	4, 0x90
_hb_audio_resample:                     ## @hb_audio_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	cmpq	$0, 48(%rdi)
	je	LBB0_6
## %bb.2:
	cmpq	$0, 32(%rbx)
	je	LBB0_12
## %bb.3:
	movl	(%rbx), %eax
	imull	%r15d, %eax
	cltd
	idivl	40(%rbx)
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %r14d
	movl	4(%rbx), %esi
	movl	12(%rbx), %ecx
	xorl	%edi, %edi
	movl	%r14d, %edx
	xorl	%r8d, %r8d
	callq	_av_samples_get_buffer_size
	movl	%eax, %edi
	callq	_hb_buffer_init
	movq	%rax, %r13
	movq	%rax, -80(%rbp)
	movq	32(%rbx), %rdi
	leaq	8(%rax), %rsi
	movl	%r14d, %edx
	movq	%r12, %rcx
	movl	%r15d, %r8d
	callq	_swr_convert
	testl	%eax, %eax
	jle	LBB0_16
## %bb.4:
	movl	%eax, %r15d
	movl	8(%rbx), %eax
	imull	%r15d, %eax
	imull	4(%rbx), %eax
	movl	%eax, (%r13)
	cmpq	$0, 24(%rbx)
	jne	LBB0_7
	jmp	LBB0_11
LBB0_5:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_13
LBB0_6:
	movl	8(%rbx), %r14d
	imull	%r15d, %r14d
	imull	4(%rbx), %r14d
	movl	%r14d, %edi
	callq	_hb_buffer_init
	movq	%rax, %r13
	movq	8(%rax), %rdi
	movq	(%r12), %rsi
	movl	%r14d, %edx
	callq	_memcpy
	cmpq	$0, 24(%rbx)
	je	LBB0_11
LBB0_7:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movslq	8(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	testl	%r15d, %r15d
	jle	LBB0_10
## %bb.8:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rbx
	xorl	%eax, %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, 16(%rcx)
	setne	%al
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(,%rcx,4), %r13
	imulq	%rcx, %rax
	leaq	(%rbx,%rax,4), %r14
	leaq	(,%rcx,8), %r12
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	addq	%r13, %rbx
	addq	%r12, %r14
	decq	%r15
	jne	LBB0_9
LBB0_10:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	imull	%r15d, %eax
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	%eax, (%r13)
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
LBB0_11:
	cvtsi2sd	%r15d, %xmm0
	mulsd	LCPI0_0(%rip), %xmm0
	cvtsi2sdl	(%rbx), %xmm1
	divsd	%xmm1, %xmm0
	cvttsd2si	%xmm0, %eax
	movl	%eax, 4(%r13)
	jmp	LBB0_15
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
LBB0_13:
	callq	_hb_error
LBB0_14:
	xorl	%r13d, %r13d
LBB0_15:
	movq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	jns	LBB0_18
## %bb.17:
	leaq	L_.str.2(%rip), %rdi
	callq	_hb_log
LBB0_18:
	leaq	-80(%rbp), %rdi
	callq	_hb_buffer_close
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hb_audio_resample: resample is NULL"

L_.str.1:                               ## @.str.1
	.asciz	"hb_audio_resample: resample needed but libswresample context is NULL"

L_.str.2:                               ## @.str.2
	.asciz	"hb_audio_resample: swr_convert() failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_audio_resample              ; -- Begin function hb_audio_resample
	.p2align	2
_hb_audio_resample:                     ; @hb_audio_resample
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x8, [x0, #48]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_12
; %bb.3:
	ldp	w8, w1, [x19]
	mul	w8, w8, w20
	ldr	w9, [x19, #40]
	sdiv	w8, w8, w9
	add	w23, w8, #1
	ldr	w3, [x19, #12]
	mov	x0, #0
	mov	x2, x23
	mov	w4, #0
	bl	_av_samples_get_buffer_size
	bl	_hb_buffer_init
	mov	x21, x0
	str	x0, [sp, #8]
	ldr	x0, [x19, #32]
	add	x1, x21, #8
	mov	x2, x23
	mov	x3, x22
	mov	x4, x20
	bl	_swr_convert
	mov	x20, x0
	cmp	w0, #0
	b.le	LBB0_16
; %bb.4:
	ldp	w9, w8, [x19, #4]
	mul	w8, w8, w20
	mul	w8, w8, w9
	str	w8, [x21]
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_7
	b	LBB0_11
LBB0_5:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_13
LBB0_6:
	ldp	w9, w8, [x19, #4]
	mul	w8, w8, w20
	mul	w23, w8, w9
	mov	x0, x23
	bl	_hb_buffer_init
	mov	x21, x0
	ldr	x0, [x0, #8]
	ldr	x1, [x22]
	mov	x2, x23
	bl	_memcpy
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_11
LBB0_7:
	ldrsw	x22, [x19, #8]
	cmp	w20, #1
	b.lt	LBB0_10
; %bb.8:
	ldr	x23, [x21, #8]
	ldr	w8, [x19, #16]
	cmp	w8, #0
	cset	w8, ne
	mov	w25, w20
	lsl	x26, x22, #2
	mul	x8, x22, x8
	add	x24, x23, x8, lsl #2
	lsl	x27, x22, #3
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x24
	mov	x2, x22
	bl	_memcpy
	add	x23, x23, x26
	add	x24, x24, x27
	subs	x25, x25, #1
	b.ne	LBB0_9
LBB0_10:
	mul	w8, w22, w20
	str	w8, [x21]
LBB0_11:
	scvtf	d0, w20
	mov	x8, #273778395316224
	movk	x8, #16629, lsl #48
	fmov	d1, x8
	fmul	d0, d0, d1
	ldr	s1, [x19]
	sshll.2d	v1, v1, #0
	scvtf	d1, d1
	fdiv	d0, d0, d1
	fcvtzs	w8, d0
	str	w8, [x21, #4]
	b	LBB0_15
LBB0_12:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_13:
	bl	_hb_error
LBB0_14:
	mov	x21, #0
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_16:
	tbz	w20, #31, LBB0_18
; %bb.17:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_hb_log
LBB0_18:
	add	x0, sp, #8
	bl	_hb_buffer_close
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hb_audio_resample: resample is NULL"

l_.str.1:                               ; @.str.1
	.asciz	"hb_audio_resample: resample needed but libswresample context is NULL"

l_.str.2:                               ; @.str.2
	.asciz	"hb_audio_resample: swr_convert() failed"

.subsections_via_symbols
