	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function convert_b8g8r8_unorm_b8g8r8a8_unorm_color_key
_convert_b8g8r8_unorm_b8g8r8a8_unorm_color_key: ## @convert_b8g8r8_unorm_b8g8r8a8_unorm_color_key
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	testl	%r9d, %r9d
	je	LBB0_8
## %bb.1:
	movl	%r9d, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	leaq	(%rax,%rax,2), %r14
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	-72(%rbp), %eax                 ## 4-byte Folded Reload
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rax
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	cmpq	-96(%rbp), %rcx                 ## 8-byte Folded Reload
	je	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax def $rax
	imull	-68(%rbp), %eax                 ## 4-byte Folded Reload
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rcx,4), %rbx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	addq	$4, %rbx
	addq	$3, %r15
	cmpq	%r15, %r14
	je	LBB0_7
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	2(%r15), %eax
	movl	(%r13,%rax,4), %eax
	shll	$16, %eax
	leal	1(%r15), %ecx
	movl	(%r13,%rcx,4), %r12d
	shll	$8, %r12d
	orl	%eax, %r12d
	movl	%r15d, %eax
	orl	(%r13,%rax,4), %r12d
	movq	24(%rbp), %rdi
	movl	%r12d, %esi
	callq	_color_in_range
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	orl	$-16777216, %r12d               ## imm = 0xFF000000
	movl	%r12d, (%rbx)
	jmp	LBB0_6
LBB0_8:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_convert_b8g8r8_unorm_b8g8r8a8_unorm_color_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_b8g8r8_unorm_b8g8r8a8_unorm_color_key
_convert_b8g8r8_unorm_b8g8r8a8_unorm_color_key: ; @convert_b8g8r8_unorm_b8g8r8a8_unorm_color_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	str	w3, [sp, #28]                   ; 4-byte Folded Spill
	str	x2, [sp, #16]                   ; 8-byte Folded Spill
	str	w1, [sp, #12]                   ; 4-byte Folded Spill
	str	x0, [sp]                        ; 8-byte Folded Spill
	cbz	w5, LBB0_8
; %bb.1:
	mov	x19, x7
	mov	x20, x4
	mov	w26, #0
	mov	x27, #0
	mov	w28, w5
	mov	w8, w4
	add	x22, x8, w4, uxtw #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x27, x27, #1
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	add	w26, w26, w8
	cmp	x27, x28
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cbz	w20, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, #0
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	add	x24, x8, w26, uxtw #2
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	mul	w8, w27, w8
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	add	x21, x9, w8, uxtw #2
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x24, x24, #4
	add	x23, x23, #3
	cmp	x22, x23
	b.eq	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w8, w23, #2
	ldr	w8, [x21, w8, uxtw #2]
	add	w9, w23, #1
	ldr	w9, [x21, w9, uxtw #2]
	lsl	w9, w9, #8
	orr	w8, w9, w8, lsl #16
	ldr	w9, [x21, w23, uxtw #2]
	orr	w25, w8, w9
	mov	x0, x19
	mov	x1, x25
	bl	_color_in_range
	cbnz	w0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	orr	w8, w25, #0xff000000
	str	w8, [x24]
	b	LBB0_5
LBB0_8:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_convert_b8g8r8_unorm_b8g8r8a8_unorm_color_key
.subsections_via_symbols
