	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function convert_p8_uint_b8g8r8a8_unorm
_convert_p8_uint_b8g8r8a8_unorm:        ## @convert_p8_uint_b8g8r8a8_unorm
	.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
	movl	%r9d, %r12d
	movl	%r8d, %r13d
	movl	%ecx, %r14d
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	cmpq	$0, 16(%rbp)
	je	LBB0_7
## %bb.1:
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.2:
	movl	%r12d, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%r13d, %r9d
	xorl	%r10d, %r10d
	xorl	%r11d, %r11d
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	addl	-44(%rbp), %r11d                ## 4-byte Folded Reload
	addl	%r14d, %r10d
	cmpq	-72(%rbp), %r12                 ## 8-byte Folded Reload
	je	LBB0_10
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r11d, %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,8), %rax
	movl	%r10d, %ecx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rcx,8), %rcx
	movq	16(%rbp), %rdx
	movq	(%rdx), %rbx
	xorl	%r8d, %r8d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rax,%r8,8), %r15
	leaq	(%r15,%r15,2), %rdx
	movl	(%rbx,%rdx,4), %edi
	movl	4(%rbx,%rdx,4), %esi
	shll	$16, %edi
	shll	$8, %esi
	orl	%edi, %esi
	orl	8(%rbx,%rdx,4), %esi
	orl	$-16777216, %esi                ## imm = 0xFF000000
	movl	%esi, (%rcx,%r8,4)
	incq	%r8
	cmpq	%r8, %r9
	jne	LBB0_5
	jmp	LBB0_6
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_FIXME
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.8:
	shll	$2, %r13d
	movl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,8), %rdi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_memset
	addl	%r14d, %ebx
	decq	%r12
	jne	LBB0_9
LBB0_10:
	addq	$40, %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	"P8 surface loaded without a palette.\n"

	.no_dead_strip	_convert_p8_uint_b8g8r8a8_unorm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_p8_uint_b8g8r8a8_unorm
_convert_p8_uint_b8g8r8a8_unorm:        ; @convert_p8_uint_b8g8r8a8_unorm
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x5
	mov	x21, x4
	mov	x19, x3
	mov	x20, x2
	cbz	x6, LBB0_7
; %bb.1:
	cbz	w22, LBB0_10
; %bb.2:
	mov	w8, #0
	mov	w9, #0
	mov	x10, #0
	mov	w11, #12
	mov	w12, w22
	mov	w13, w21
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #1
	add	w9, w9, w1
	add	w8, w8, w19
	cmp	x10, x12
	b.eq	LBB0_10
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cbz	w21, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x14, x0, w9, uxtw #3
	ldr	x15, [x6]
	mov	x16, x13
	add	x17, x20, w8, uxtw #3
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x2, [x14], #8
	madd	x2, x2, x11, x15
	ldp	w3, w4, [x2]
	lsl	w3, w3, #16
	ldr	w2, [x2, #8]
	orr	w3, w3, w4, lsl #8
	orr	w2, w3, w2
	orr	w2, w2, #0xff000000
	str	w2, [x17], #4
	subs	x16, x16, #1
	b.ne	LBB0_6
	b	LBB0_3
LBB0_7:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
	cbz	w22, LBB0_10
; %bb.8:
	mov	w23, #0
	lsl	w21, w21, #2
	mov	w22, w22
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x20, w23, uxtw #3
	mov	w1, #0
	mov	x2, x21
	bl	_memset
	add	w23, w23, w19
	subs	x22, x22, #1
	b.ne	LBB0_9
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"P8 surface loaded without a palette.\n"

	.no_dead_strip	_convert_p8_uint_b8g8r8a8_unorm
.subsections_via_symbols
