	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function channel_resample
_channel_resample:                      ## @channel_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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_16
## %bb.1:
	movl	%ecx, %r11d
	movl	%edx, %r10d
	movq	24(%rdi), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %r14
	movl	4(%rdi), %r13d
	movl	8(%rdi), %ebx
	movl	$255, %r15d
	subl	%r13d, %r15d
	imull	%eax, %r15d
	sarl	$8, %r15d
	imull	%eax, %r13d
	movl	16(%rdi), %eax
	movq	_FP_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	leal	-3(%r12), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	sarl	$8, %r13d
	movl	%r9d, %ecx
	movl	12(%rdi), %r9d
	sarl	$3, %r8d
	cltd
	idivl	%r8d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edx
	movl	12(%rax), %edi
	addl	%edx, %edi
	addl	%r10d, %r11d
	addl	%r10d, %r10d
	addl	%r11d, %r11d
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.2:
	cmpl	%r11d, %r10d
	jge	LBB0_16
## %bb.3:
	movslq	%r10d, %r8
	movslq	%r11d, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movslq	%ebx, %rbx
	movswl	(%r14,%rbx,2), %r11d
	movswl	2(%r14,%rbx,2), %r10d
	subl	%r11d, %r10d
	imull	%r9d, %r10d
	movl	%r12d, %ecx
	sarl	%cl, %r10d
	addl	%r11d, %r10d
	movl	%r10d, %eax
	imull	%r15d, %eax
	sarl	%cl, %eax
	addl	%eax, (%rsi,%r8,4)
	leaq	(,%r8,4), %rax
	imull	%r13d, %r10d
	movq	_FP_SHIFT@GOTPCREL(%rip), %r11
	movb	(%r11), %cl
	sarl	%cl, %r10d
	orq	$4, %rax
	addl	%r10d, (%rsi,%rax)
	addl	-44(%rbp), %r9d                 ## 4-byte Folded Reload
	movl	(%r11), %r12d
	movl	%r9d, %eax
	movl	%r12d, %ecx
	sarl	%cl, %eax
	addl	%eax, %ebx
	addq	$2, %r8
	movq	_FP_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r9d
	cmpq	-56(%rbp), %r8                  ## 8-byte Folded Reload
	jge	LBB0_16
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	cmpl	%edi, %ebx
	jl	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$2, %edx
	jl	LBB0_16
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	addl	%edx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	subl	%edx, %ebx
	cmpl	%edi, %ebx
	jge	LBB0_7
	jmp	LBB0_8
LBB0_9:
	cmpl	%r11d, %r10d
	jge	LBB0_16
## %bb.10:
	movslq	%r10d, %r8
	movslq	%r11d, %r10
	movl	%r13d, %r11d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	movslq	%ebx, %rbx
	movswl	(%r14,%rbx,2), %eax
	movl	%r15d, %r13d
	imull	%eax, %r13d
	movl	%r12d, %ecx
	sarl	%cl, %r13d
	addl	%r13d, (%rsi,%r8,4)
	leaq	(,%r8,4), %r12
	movl	%r11d, %ecx
	imull	%r11d, %eax
	movq	_FP_SHIFT@GOTPCREL(%rip), %r13
	movb	(%r13), %cl
	sarl	%cl, %eax
	orq	$4, %r12
	addl	%eax, (%rsi,%r12)
	addl	-44(%rbp), %r9d                 ## 4-byte Folded Reload
	movl	(%r13), %r12d
	movl	%r9d, %eax
	movl	%r12d, %ecx
	sarl	%cl, %eax
	addl	%eax, %ebx
	addq	$2, %r8
	movq	_FP_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r9d
	cmpq	%r10, %r8
	jge	LBB0_16
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	cmpl	%edi, %ebx
	jl	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$2, %edx
	jl	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	addl	%edx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	subl	%edx, %ebx
	cmpl	%edi, %ebx
	jge	LBB0_14
	jmp	LBB0_15
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FP_SHIFT,4,2                   ## @FP_SHIFT
	.comm	_FP_MASK,4,2                    ## @FP_MASK
	.no_dead_strip	_channel_resample
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function channel_resample
_channel_resample:                      ; @channel_resample
	.cfi_startproc
; %bb.0:
	ldr	w11, [x0]
	cmp	w11, #1
	b.lt	LBB0_16
; %bb.1:
	ldr	x16, [x0, #24]
	ldr	x8, [x16]
	mov	w10, #255
	ldp	w12, w9, [x0, #4]
	sub	w10, w10, w12
	mul	w10, w10, w11
	asr	w10, w10, #8
	mul	w11, w12, w11
	asr	w11, w11, #8
Lloh0:
	adrp	x12, _FP_SHIFT@GOTPAGE
Lloh1:
	ldr	x12, [x12, _FP_SHIFT@GOTPAGEOFF]
	ldp	w13, w14, [x0, #12]
	ldr	w17, [x12]
	sub	w15, w17, #3
	lsl	w14, w14, w15
	asr	w15, w4, #3
	sdiv	w14, w14, w15
	ldp	w15, w16, [x16, #8]
	add	w16, w16, w15
	lsl	w0, w2, #1
	add	w2, w3, w2
	lsl	w2, w2, #1
	cmp	w0, w2
	cbz	w5, LBB0_9
; %bb.2:
	b.ge	LBB0_16
; %bb.3:
	sxtw	x0, w0
	sxtw	x2, w2
Lloh2:
	adrp	x3, _FP_MASK@GOTPAGE
Lloh3:
	ldr	x3, [x3, _FP_MASK@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x4, x8, w9, sxtw #1
	ldrsh	w5, [x4]
	ldrsh	w4, [x4, #2]
	sub	w4, w4, w5
	mul	w4, w4, w13
	asr	w4, w4, w17
	add	w4, w4, w5
	mul	w5, w4, w10
	asr	w17, w5, w17
	lsl	x5, x0, #2
	ldr	w6, [x1, x5]
	add	w17, w17, w6
	str	w17, [x1, x5]
	mul	w17, w4, w11
	ldr	w4, [x12]
	asr	w17, w17, w4
	add	x0, x0, #2
	orr	x4, x5, #0x4
	ldr	w5, [x1, x4]
	add	w17, w17, w5
	str	w17, [x1, x4]
	ldr	w17, [x12]
	ldr	w4, [x3]
	add	w5, w13, w14
	and	w13, w4, w5
	asr	w4, w5, w17
	add	w9, w4, w9
	cmp	x0, x2
	b.ge	LBB0_16
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	cmp	w9, w16
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w15, #2
	b.lt	LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w9, w15, w9
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w9, w9, w15
	cmp	w9, w16
	b.ge	LBB0_8
	b	LBB0_4
LBB0_9:
	b.ge	LBB0_16
; %bb.10:
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	sxtw	x0, w0
                                        ; kill: def $w2 killed $w2 killed $x2 def $x2
	sxtw	x2, w2
Lloh4:
	adrp	x3, _FP_MASK@GOTPAGE
Lloh5:
	ldr	x3, [x3, _FP_MASK@GOTPAGEOFF]
                                        ; kill: def $w17 killed $w17 killed $x17 def $x17
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldrsh	w4, [x8, w9, sxtw #1]
	mul	w5, w10, w4
	asr	w17, w5, w17
	lsl	x5, x0, #2
	ldr	w6, [x1, x5]
	add	w17, w17, w6
	str	w17, [x1, x5]
	mul	w17, w11, w4
	ldr	w4, [x12]
	asr	w17, w17, w4
	add	x0, x0, #2
	orr	x4, x5, #0x4
	ldr	w5, [x1, x4]
	add	w17, w5, w17
	str	w17, [x1, x4]
	ldr	w17, [x12]
	ldr	w4, [x3]
	add	w5, w13, w14
	and	w13, w4, w5
	asr	w4, w5, w17
	add	w9, w4, w9
	cmp	x0, x2
	b.ge	LBB0_16
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	cmp	w9, w16
	b.lt	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w15, #2
	b.lt	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	add	w9, w15, w9
LBB0_15:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w9, w9, w15
	cmp	w9, w16
	b.ge	LBB0_15
	b	LBB0_11
LBB0_16:
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FP_SHIFT,4,2                   ; @FP_SHIFT
	.comm	_FP_MASK,4,2                    ; @FP_MASK
	.no_dead_strip	_channel_resample
.subsections_via_symbols
