	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	3                               ## -- Begin function hb_audio_resample_init
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.quad	0x408f400000000000              ## double 1000
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_hb_audio_resample_init
	.p2align	4, 0x90
_hb_audio_resample_init:                ## @hb_audio_resample_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movl	%edx, %r12d
	movl	%esi, %r15d
	movl	%edi, %r14d
	movl	$1, %edi
	movl	$96, %esi
	callq	_calloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	$0, 88(%rbx)
	movl	%r14d, %edi
	callq	_av_sample_fmt_is_planar
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	%r14d, %edi
	callq	_av_get_sample_fmt_name
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_hb_error
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_hb_error
LBB0_4:
	movq	%rbx, %rdi
	callq	_hb_audio_resample_free
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_5:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	leaq	-48(%rbp), %rsi
	movl	%r12d, %edi
	callq	_hb_ff_mixdown_xlat
	movl	%eax, %r13d
	movq	_HB_AMIXDOWN_LEFT@GOTPCREL(%rip), %rcx
	movq	_HB_AMIXDOWN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%r12d, (%rcx)
	je	LBB0_8
## %bb.6:
	cmpl	%r12d, %eax
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_8:
	xorl	%ecx, %ecx
	cmpl	%r12d, %eax
	sete	%cl
	movq	_AV_CH_LAYOUT_STEREO@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%ecx, 4(%rbx)
	movl	$1, %eax
LBB0_9:
	movl	%eax, (%rbx)
	movl	%r13d, %edi
	callq	_av_get_channel_layout_nb_channels
	movl	%eax, 80(%rbx)
	movl	%r13d, 72(%rbx)
	movl	-48(%rbp), %eax
	movl	%eax, 48(%rbx)
	movl	%r14d, 52(%rbx)
	movl	%r15d, 56(%rbx)
	xorl	%eax, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	sete	%al
	leaq	LCPI0_0(%rip), %rcx
	movsd	(%rcx,%rax,8), %xmm0            ## xmm0 = mem[0],zero
	movsd	%xmm0, 64(%rbx)
	movl	%r14d, %edi
	callq	_av_get_bytes_per_sample
	movl	%eax, 76(%rbx)
	movl	%r14d, 16(%rbx)
	movl	%r15d, 20(%rbx)
	movl	%r13d, 44(%rbx)
	movq	_HB_MIXLEV_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	_HB_MIXLEV_DEFAULT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	%rax, 24(%rbx)
	movq	$0, 8(%rbx)
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hb_audio_resample_init: failed to allocate resample"

L_.str.1:                               ## @.str.1
	.asciz	"hb_audio_resample_init: planar output not supported ('%s')"

	.comm	_HB_AMIXDOWN_LEFT,4,2           ## @HB_AMIXDOWN_LEFT
	.comm	_HB_AMIXDOWN_RIGHT,4,2          ## @HB_AMIXDOWN_RIGHT
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ## @AV_CH_LAYOUT_STEREO
	.comm	_HB_MIXLEV_ZERO,4,2             ## @HB_MIXLEV_ZERO
	.comm	_HB_MIXLEV_DEFAULT,8,3          ## @HB_MIXLEV_DEFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_audio_resample_init         ; -- Begin function hb_audio_resample_init
	.p2align	2
_hb_audio_resample_init:                ; @hb_audio_resample_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x3
	mov	x24, x2
	mov	x21, x1
	mov	x20, x0
	mov	w0, #1
	mov	w1, #96
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_3
; %bb.1:
	str	xzr, [x19, #88]
	mov	x0, x20
	bl	_av_sample_fmt_is_planar
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x20
	bl	_av_get_sample_fmt_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
LBB0_4:
	bl	_hb_error
	mov	x0, x19
	bl	_hb_audio_resample_free
	mov	x19, #0
	b	LBB0_9
LBB0_5:
	add	x1, sp, #12
	mov	x0, x24
	bl	_hb_ff_mixdown_xlat
Lloh4:
	adrp	x8, _HB_AMIXDOWN_LEFT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HB_AMIXDOWN_LEFT@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x8]
Lloh7:
	adrp	x8, _HB_AMIXDOWN_RIGHT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HB_AMIXDOWN_RIGHT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w9, w24
	ccmp	w8, w24, #4, ne
	b.ne	LBB0_7
; %bb.6:
	cmp	w8, w24
	cset	w8, eq
Lloh10:
	adrp	x9, _AV_CH_LAYOUT_STEREO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AV_CH_LAYOUT_STEREO@GOTPAGEOFF]
Lloh12:
	ldr	w23, [x9]
	str	w8, [x19, #4]
	mov	w8, #1
	b	LBB0_8
LBB0_7:
	mov	x23, x0
	mov	w8, #0
LBB0_8:
	str	w8, [x19]
	mov	x0, x23
	bl	_av_get_channel_layout_nb_channels
	str	w0, [x19, #80]
	str	w23, [x19, #72]
	ldr	w8, [sp, #12]
	stp	w8, w20, [x19, #48]
	str	w21, [x19, #56]
	cmp	w22, #0
	mov	x8, #70368744177664
	movk	x8, #16527, lsl #48
	fmov	d0, x8
	fmov	d1, #1.00000000
	fcsel	d0, d0, d1, eq
	str	d0, [x19, #64]
	mov	x0, x20
	bl	_av_get_bytes_per_sample
	str	w0, [x19, #76]
	stp	w20, w21, [x19, #16]
Lloh13:
	adrp	x8, _HB_MIXLEV_ZERO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HB_MIXLEV_ZERO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	stp	w8, w23, [x19, #40]
Lloh16:
	adrp	x8, _HB_MIXLEV_DEFAULT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HB_MIXLEV_DEFAULT@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #24]
	str	xzr, [x19, #8]
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hb_audio_resample_init: failed to allocate resample"

l_.str.1:                               ; @.str.1
	.asciz	"hb_audio_resample_init: planar output not supported ('%s')"

	.comm	_HB_AMIXDOWN_LEFT,4,2           ; @HB_AMIXDOWN_LEFT
	.comm	_HB_AMIXDOWN_RIGHT,4,2          ; @HB_AMIXDOWN_RIGHT
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ; @AV_CH_LAYOUT_STEREO
	.comm	_HB_MIXLEV_ZERO,4,2             ; @HB_MIXLEV_ZERO
	.comm	_HB_MIXLEV_DEFAULT,8,3          ; @HB_MIXLEV_DEFAULT
.subsections_via_symbols
