	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function RGBAtoNormal
_RGBAtoNormal:                          ## @RGBAtoNormal
	.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
	testl	%ecx, %ecx
	jle	LBB0_23
## %bb.1:
	movl	%edx, %r13d
	movq	%rsi, %r9
	movq	%rdi, %rbx
	leal	(,%r13,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	addq	$12, %r9
	movl	$1, %eax
	xorl	%edx, %edx
	movl	$2155905153, %edi               ## imm = 0x80808081
	xorl	%esi, %esi
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	incq	%rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	addl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	cmpq	-56(%rbp), %rsi                 ## 8-byte Folded Reload
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%r13d, %r13d
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%edx, %r12
	shlq	$2, %r12
	movl	%r13d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx,%r12), %ecx
	movl	4(%rbx,%r12), %edx
	sarl	$2, %ecx
	sarl	%edx
	addl	%ecx, %edx
	movl	8(%rbx,%r12), %esi
	sarl	$2, %esi
	addl	%edx, %esi
	imull	%esi, %esi
	imulq	%rdi, %rsi
	shrq	$39, %rsi
	movl	%esi, (%r9,%r12)
	movl	%eax, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r9, %r15
	callq	_MAX
	movl	$2155905153, %edi               ## imm = 0x80808081
	movq	%r15, %r9
	addq	$16, %r12
	decl	%r14d
	jne	LBB0_4
	jmp	LBB0_5
LBB0_6:
	cmpl	$254, %eax
	jg	LBB0_16
## %bb.7:
	movl	$255, %ecx
	subl	%eax, %ecx
	leal	-1(%r13), %eax
	movl	%r13d, %r8d
	andl	$-4, %r8d
	movl	%r13d, %esi
	andl	$3, %esi
	shlq	$4, %rsi
	xorl	%edi, %edi
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rdi
	cmpq	-56(%rbp), %rdi                 ## 8-byte Folded Reload
	je	LBB0_16
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
                                        ##     Child Loop BB0_14 Depth 2
	testl	%r13d, %r13d
	jle	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	imull	%edi, %edx
	movslq	%edx, %rdx
	leaq	(%r9,%rdx,4), %rbx
	cmpl	$3, %eax
	jb	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%r8d, %edx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addl	%ecx, (%rbx)
	addl	%ecx, 16(%rbx)
	addl	%ecx, 32(%rbx)
	addl	%ecx, 48(%rbx)
	addq	$64, %rbx
	addl	$-4, %edx
	jne	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	testb	$3, %r13b
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addl	%ecx, (%rbx,%rdx)
	addq	$16, %rdx
	cmpl	%edx, %esi
	jne	LBB0_14
	jmp	LBB0_15
LBB0_16:
	movl	%r14d, %eax
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	testl	%r13d, %r13d
	jg	LBB0_18
## %bb.22:                              ##   in Loop: Header=BB0_17 Depth=1
	decl	%eax
	jne	LBB0_17
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	decl	%r14d
	decl	%r13d
	movl	$-1, %ebx
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	incl	%ebx
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	testq	%r15, %r15
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ebx, %edi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_CLAMP
	movl	$-1, %edi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_CLAMP
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_CLAMP
	movl	$1, %edi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_CLAMP
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_RGBAtoNormal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function RGBAtoNormal
_RGBAtoNormal:                          ; @RGBAtoNormal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x0, [sp, #16]                   ; 8-byte Folded Spill
	subs	w20, w3, #1
	b.lt	LBB0_19
; %bb.1:
	mov	x19, x4
	mov	x21, x3
	mov	x25, x2
	mov	x23, #0
	lsl	w8, w2, #2
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	add	x9, x1, #12
	mov	w0, #1
	mov	w26, #32897
	movk	w26, #32896, lsl #16
	mov	w8, w3
	stp	x9, x8, [sp, #32]               ; 16-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	cmp	x23, x8
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	subs	w27, w25, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	mul	w8, w8, w23
	sbfiz	x8, x8, #2, #32
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	add	x24, x9, x8
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	add	x28, x9, x8
	mov	x22, x25
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	w8, w9, [x28]
	asr	w9, w9, #1
	add	w8, w9, w8, asr #2
	ldr	w9, [x28, #8]
	add	w8, w8, w9, asr #2
	mul	w8, w8, w8
	umull	x8, w8, w26
	lsr	x1, x8, #39
	str	w1, [x24], #16
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_MAX
	add	x28, x28, #16
	subs	w22, w22, #1
	b.ne	LBB0_5
	b	LBB0_2
LBB0_6:
	cmp	w0, #254
	ldr	w4, [sp, #28]                   ; 4-byte Folded Reload
	b.gt	LBB0_17
; %bb.7:
	mov	w8, #0
	mov	x9, #0
	mov	w10, #255
	sub	w10, w10, w0
	add	x11, x27, #1
	and	x12, x11, #0x1fffffffc
	lsl	x13, x12, #2
	ldr	x14, [sp, #8]                   ; 8-byte Folded Reload
	add	x14, x14, #44
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x9, x9, #1
	add	w8, w8, w4
	ldr	x15, [sp, #40]                  ; 8-byte Folded Reload
	cmp	x9, x15
	b.eq	LBB0_17
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
                                        ;     Child Loop BB0_16 Depth 2
	cmp	w25, #1
	b.lt	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mul	w15, w4, w9
	ldr	x16, [sp, #32]                  ; 8-byte Folded Reload
	add	x15, x16, w15, sxtw #2
	cmp	w27, #3
	b.hs	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w16, #0
	b	LBB0_15
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	add	x16, x14, w8, sxtw #2
	mov	x17, x12
	add	x15, x15, x13, lsl #2
LBB0_13:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	w0, [x16, #-32]
	ldur	w1, [x16, #-16]
	ldr	w2, [x16]
	ldr	w3, [x16, #16]
	add	w0, w10, w0
	add	w1, w10, w1
	add	w2, w10, w2
	add	w3, w10, w3
	stur	w0, [x16, #-32]
	stur	w1, [x16, #-16]
	str	w2, [x16]
	str	w3, [x16, #16]
	add	x16, x16, #64
	subs	x17, x17, #4
	b.ne	LBB0_13
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x16, x12
	cmp	x11, x12
	b.eq	LBB0_8
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=1
	sub	w16, w25, w16
LBB0_16:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w17, [x15]
	add	w17, w10, w17
	str	w17, [x15], #16
	subs	w16, w16, #1
	b.ne	LBB0_16
	b	LBB0_8
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	subs	w23, w25, #1
	b.ge	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	subs	w21, w21, #1
	b.ne	LBB0_17
LBB0_19:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_20:
	mov	w21, #-1
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	add	w21, w21, #1
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	cbz	x19, LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	x0, x21
	mov	w1, #0
	mov	x2, x20
	bl	_CLAMP
	mov	w0, #-1
	mov	w1, #0
	mov	x2, x23
	bl	_CLAMP
	mov	w0, #0
	mov	w1, #0
	mov	x2, x23
	bl	_CLAMP
	mov	w0, #1
	mov	w1, #0
	mov	x2, x23
	bl	_CLAMP
	b	LBB0_21
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_RGBAtoNormal
.subsections_via_symbols
