	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdImageColorAllocateAlpha      ## -- Begin function gdImageColorAllocateAlpha
	.p2align	4, 0x90
_gdImageColorAllocateAlpha:             ## @gdImageColorAllocateAlpha
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpq	$0, 48(%rdi)
	je	LBB0_1
## %bb.10:
	movl	%esi, %edi
	movl	%edx, %esi
	movl	%ecx, %edx
	movl	%r8d, %ecx
	popq	%rbp
	jmp	_gdTrueColorAlpha               ## TAILCALL
LBB0_1:
	movl	(%rdi), %r9d
	testl	%r9d, %r9d
	jle	LBB0_5
## %bb.2:
	movq	40(%rdi), %r10
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r10,%rax,8)
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rax
	cmpq	%rax, %r9
	jne	LBB0_3
LBB0_5:
	movq	_gdMaxColors@GOTPCREL(%rip), %r10
	movl	$-1, %eax
	cmpl	(%r10), %r9d
	je	LBB0_9
## %bb.6:
	leal	1(%r9), %eax
	movl	%eax, (%rdi)
	movq	40(%rdi), %r10
	jmp	LBB0_8
LBB0_7:
	movl	%eax, %r9d
LBB0_8:
	movq	8(%rdi), %r11
	movslq	%r9d, %rax
	movl	%esi, (%r11,%rax,4)
	movq	16(%rdi), %rsi
	movl	%edx, (%rsi,%rax,4)
	movq	24(%rdi), %rdx
	movl	%ecx, (%rdx,%rax,4)
	movq	32(%rdi), %rcx
	movl	%r8d, (%rcx,%rax,4)
	movq	$0, (%r10,%rax,8)
	movl	%r9d, %eax
LBB0_9:
	popq	%rbp
	retq
	.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	_gdImageColorAllocateAlpha      ; -- Begin function gdImageColorAllocateAlpha
	.p2align	2
_gdImageColorAllocateAlpha:             ; @gdImageColorAllocateAlpha
	.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	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x10, #0
	ldr	x9, [x0, #40]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9, x10, lsl #3]
	cbnz	x11, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #1
	cmp	x8, x10
	b.ne	LBB0_4
LBB0_6:
Lloh0:
	adrp	x9, _gdMaxColors@GOTPAGE
Lloh1:
	ldr	x9, [x9, _gdMaxColors@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.7:
	mov	w8, #-1
	mov	x0, x8
	ret
LBB0_8:
	add	w9, w8, #1
	str	w9, [x0]
	ldr	x9, [x0, #40]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	b	LBB0_10
LBB0_9:
	mov	x8, x10
LBB0_10:
	sbfiz	x10, x8, #2, #32
	ldp	x11, x12, [x0, #8]
	str	w1, [x11, x10]
	str	w2, [x12, x10]
	ldp	x11, x12, [x0, #24]
	str	w3, [x11, x10]
	str	w4, [x12, x10]
	str	xzr, [x9, w8, sxtw #3]
	mov	x0, x8
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_gdMaxColors,4,2                ; @gdMaxColors
.subsections_via_symbols
