	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function extractsrccolors
_extractsrccolors:                      ## @extractsrccolors
	.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	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	testl	%r8d, %r8d
	jle	LBB0_10
## %bb.1:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	imull	%r9d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %ecx
	movl	-48(%rbp), %r11d                ## 4-byte Reload
	movl	%r9d, %r12d
	shlq	$2, %r12
	xorl	%r14d, %r14d
	movq	_CHAN_MAX@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	addq	$64, %rdi
	cmpq	%rcx, %r14
	je	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	imull	%r14d, %eax
	cltq
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rax,4), %r13
	movq	%rdi, %rbx
	xorl	%r10d, %r10d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	incq	%r10
	addq	$16, %rbx
	cmpq	%r11, %r10
	je	LBB0_9
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	testl	%r9d, %r9d
	jle	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	xorl	%r8d, %r8d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%r13,%r8), %eax
	movslq	(%r15), %rdx
	imulq	$-2139062143, %rdx, %rsi        ## imm = 0x80808081
	shrq	$32, %rsi
	addl	%edx, %esi
	movl	%esi, %edx
	shrl	$31, %edx
	sarl	$7, %esi
	addl	%edx, %esi
	cltd
	idivl	%esi
	movl	%eax, (%rbx,%r8)
	addq	$4, %r8
	cmpq	%r8, %r12
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	addq	%r8, %r13
	jmp	LBB0_8
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHAN_MAX,4,2                   ## @CHAN_MAX
	.no_dead_strip	_extractsrccolors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function extractsrccolors
_extractsrccolors:                      ; @extractsrccolors
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	cmp	w4, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x8, #0
	mul	w9, w5, w2
	mov	w10, w4
Lloh0:
	adrp	x11, _CHAN_MAX@GOTPAGE
Lloh1:
	ldr	x11, [x11, _CHAN_MAX@GOTPAGEOFF]
	mov	x12, #-32639
	movk	x12, #32896, lsl #16
	mov	w13, w3
	mov	w14, w5
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	add	x0, x0, #64
	cmp	x8, x10
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_8 Depth 3
	cmp	w3, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x15, #0
	mul	w16, w9, w8
	add	x16, x1, w16, sxtw #2
	mov	x17, x0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x15, x15, #1
	add	x17, x17, #16
	cmp	x15, x13
	b.eq	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_8 Depth 3
	cmp	w5, #1
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x2, x14
	mov	x4, x17
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w6, [x16], #4
	ldrsw	x7, [x11]
	mul	x19, x7, x12
	lsr	x19, x19, #32
	add	w7, w19, w7
	asr	w19, w7, #7
	add	w7, w19, w7, lsr #31
	sdiv	w6, w6, w7
	str	w6, [x4], #4
	subs	x2, x2, #1
	b.ne	LBB0_8
	b	LBB0_5
LBB0_9:
	ldp	x20, x19, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CHAN_MAX,4,2                   ; @CHAN_MAX
	.no_dead_strip	_extractsrccolors
.subsections_via_symbols
