	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdLayerOverlay                 ## -- Begin function gdLayerOverlay
	.p2align	4, 0x90
_gdLayerOverlay:                        ## @gdLayerOverlay
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movl	%edi, %r14d
	movq	_gdAlphaMax@GOTPCREL(%rip), %r12
	movl	(%r12), %r13d
	callq	_gdTrueColorGetAlpha
	subl	%eax, %r13d
	movl	(%r12), %ebx
	movl	%r15d, %edi
	callq	_gdTrueColorGetAlpha
	subl	%eax, %ebx
	imull	%r13d, %ebx
	movl	(%r12), %r12d
	movl	%ebx, %eax
	cltd
	idivl	%r12d
	subl	%eax, %r12d
	shll	$24, %r12d
	movl	%r15d, %edi
	callq	_gdTrueColorGetRed
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_gdTrueColorGetRed
	movq	_gdRedMax@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_gdAlphaOverlayColor
	movl	%eax, %r13d
	shll	$16, %r13d
	addl	%r12d, %r13d
	movl	%r15d, %edi
	callq	_gdTrueColorGetGreen
	movl	%eax, %r12d
	movl	%r14d, %edi
	callq	_gdTrueColorGetGreen
	movq	_gdGreenMax@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_gdAlphaOverlayColor
	movl	%eax, %ebx
	shll	$8, %ebx
	addl	%r13d, %ebx
	movl	%r15d, %edi
	callq	_gdTrueColorGetBlue
	movl	%eax, %r15d
	movl	%r14d, %edi
	callq	_gdTrueColorGetBlue
	movq	_gdBlueMax@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_gdAlphaOverlayColor
	addl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gdAlphaMax,4,2                 ## @gdAlphaMax
	.comm	_gdRedMax,4,2                   ## @gdRedMax
	.comm	_gdGreenMax,4,2                 ## @gdGreenMax
	.comm	_gdBlueMax,4,2                  ## @gdBlueMax
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdLayerOverlay                 ; -- Begin function gdLayerOverlay
	.p2align	2
_gdLayerOverlay:                        ; @gdLayerOverlay
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _gdAlphaMax@GOTPAGE
Lloh1:
	ldr	x21, [x21, _gdAlphaMax@GOTPAGEOFF]
	ldr	w22, [x21]
	bl	_gdTrueColorGetAlpha
	sub	w22, w22, w0
	ldr	w23, [x21]
	mov	x0, x20
	bl	_gdTrueColorGetAlpha
	sub	w8, w23, w0
	ldr	w9, [x21]
	mul	w8, w8, w22
	sdiv	w8, w8, w9
	sub	w22, w9, w8
	mov	x0, x20
	bl	_gdTrueColorGetRed
	mov	x21, x0
	mov	x0, x19
	bl	_gdTrueColorGetRed
	mov	x1, x0
Lloh2:
	adrp	x8, _gdRedMax@GOTPAGE
Lloh3:
	ldr	x8, [x8, _gdRedMax@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_gdAlphaOverlayColor
	lsl	w8, w0, #16
	add	w22, w8, w22, lsl #24
	mov	x0, x20
	bl	_gdTrueColorGetGreen
	mov	x21, x0
	mov	x0, x19
	bl	_gdTrueColorGetGreen
	mov	x1, x0
Lloh5:
	adrp	x8, _gdGreenMax@GOTPAGE
Lloh6:
	ldr	x8, [x8, _gdGreenMax@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_gdAlphaOverlayColor
	add	w21, w22, w0, lsl #8
	mov	x0, x20
	bl	_gdTrueColorGetBlue
	mov	x20, x0
	mov	x0, x19
	bl	_gdTrueColorGetBlue
	mov	x1, x0
Lloh8:
	adrp	x8, _gdBlueMax@GOTPAGE
Lloh9:
	ldr	x8, [x8, _gdBlueMax@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_gdAlphaOverlayColor
	add	w0, w21, w0
	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 AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_gdAlphaMax,4,2                 ; @gdAlphaMax
	.comm	_gdRedMax,4,2                   ; @gdRedMax
	.comm	_gdGreenMax,4,2                 ; @gdGreenMax
	.comm	_gdBlueMax,4,2                  ; @gdBlueMax
.subsections_via_symbols
