	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdImageColorResolveAlpha       ## -- Begin function gdImageColorResolveAlpha
	.p2align	4, 0x90
_gdImageColorResolveAlpha:              ## @gdImageColorResolveAlpha
	.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
	cmpq	$0, 48(%rdi)
	je	LBB0_1
## %bb.3:
	movl	%esi, %edi
	movl	%edx, %esi
	movl	%ecx, %edx
	movl	%r8d, %ecx
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gdTrueColorAlpha               ## TAILCALL
LBB0_1:
	movl	(%rdi), %r9d
	testl	%r9d, %r9d
	jle	LBB0_2
## %bb.4:
	movq	40(%rdi), %r11
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	movl	$260100, %r12d                  ## imm = 0x3F804
	xorl	%ebx, %ebx
	movslq	%esi, %rax
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movslq	%edx, %rdx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movslq	%ecx, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	movslq	%r8d, %r13
	movq	%rax, %r8
	movl	$-1, %r10d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %r10d
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	cmpq	%rbx, %r9
	je	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r11,%rbx,8)
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%rdi), %eax
	cmpq	%rax, %rbx
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	movslq	(%rax,%rbx,4), %r15
	subq	%r8, %r15
	movslq	(%rcx,%rbx,4), %rcx
	subq	-72(%rbp), %rcx                 ## 8-byte Folded Reload
	movq	24(%rdi), %rdx
	movslq	(%rdx,%rbx,4), %rdx
	subq	-64(%rbp), %rdx                 ## 8-byte Folded Reload
	movq	32(%rdi), %rax
	movslq	(%rax,%rbx,4), %r14
	subq	%r13, %r14
	imulq	%r15, %r15
	imulq	%rcx, %rcx
	addq	%r15, %rcx
	imulq	%rdx, %rdx
	addq	%rcx, %rdx
	imulq	%r14, %r14
	addq	%rdx, %r14
	cmpq	%r12, %r14
	jge	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	testq	%r14, %r14
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %eax
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %r12
	jmp	LBB0_11
LBB0_12:
	cmpl	$-1, %r10d
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jne	LBB0_15
	jmp	LBB0_13
LBB0_2:
	movl	$-1, %eax
LBB0_13:
	movq	_gdMaxColors@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %r9d
	je	LBB0_17
## %bb.14:
	leal	1(%r9), %eax
	movl	%eax, (%rdi)
	movl	%r9d, %r10d
LBB0_15:
	movq	8(%rdi), %rax
	movslq	%r10d, %rbx
	movl	%esi, (%rax,%rbx,4)
	movq	16(%rdi), %rax
	movl	%edx, (%rax,%rbx,4)
	movq	24(%rdi), %rax
	movl	%ecx, (%rax,%rbx,4)
	movq	32(%rdi), %rax
	movl	%r8d, (%rax,%rbx,4)
	movq	40(%rdi), %rax
	movq	$0, (%rax,%rbx,8)
	movl	%r10d, %eax
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	%ebx, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_gdMaxColors,4,2                ## @gdMaxColors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdImageColorResolveAlpha       ; -- Begin function gdImageColorResolveAlpha
	.p2align	2
_gdImageColorResolveAlpha:              ; @gdImageColorResolveAlpha
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0, #48]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x1
	mov	x1, x2
	mov	x2, x3
	mov	x3, x4
	b	_gdTrueColorAlpha
LBB0_2:
	ldr	w9, [x0]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.3:
	mov	x11, #0
	ldr	x12, [x0, #40]
	mov	w8, #-1
	mov	w13, #63492
	movk	w13, #3, lsl #16
	mov	w10, #-1
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x10, x11
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x11, x11, #1
	cmp	x9, x11
	b.eq	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x12, x11, lsl #3]
	cbnz	x14, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w14, [x0, #4]
	cmp	x11, x14
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	lsl	x14, x11, #2
	ldp	x15, x16, [x0, #8]
	ldrsw	x15, [x15, x14]
	sub	x15, x15, w1, sxtw
	ldrsw	x16, [x16, x14]
	sub	x16, x16, w2, sxtw
	ldp	x17, x5, [x0, #24]
	ldrsw	x17, [x17, x14]
	sub	x17, x17, w3, sxtw
	ldrsw	x14, [x5, x14]
	sub	x14, x14, w4, sxtw
	mul	x15, x15, x15
	madd	x15, x16, x16, x15
	madd	x15, x17, x17, x15
	madd	x14, x14, x14, x15
	cmp	x14, x13
	b.ge	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	x14, LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x8, x11
	mov	x13, x14
	b	LBB0_5
LBB0_11:
	cmn	w10, #1
	b.ne	LBB0_16
	b	LBB0_13
LBB0_12:
	mov	w8, #-1
LBB0_13:
Lloh0:
	adrp	x10, _gdMaxColors@GOTPAGE
Lloh1:
	ldr	x10, [x10, _gdMaxColors@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x8
	ret
LBB0_15:
	add	w8, w9, #1
	str	w8, [x0]
	mov	x10, x9
LBB0_16:
	sbfiz	x8, x10, #2, #32
	ldp	x9, x11, [x0, #8]
	str	w1, [x9, x8]
	str	w2, [x11, x8]
	ldp	x9, x11, [x0, #24]
	str	w3, [x9, x8]
	str	w4, [x11, x8]
	ldr	x9, [x0, #40]
	str	xzr, [x9, w10, sxtw #3]
	mov	x0, x10
	ret
LBB0_17:
	mov	x8, x11
	mov	x0, x8
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_gdMaxColors,4,2                ; @gdMaxColors
.subsections_via_symbols
